Added document title and fixed viewport size
This commit is contained in:
@@ -44,9 +44,9 @@ const createMarkdownLoaderManifest = ({
|
||||
publicAssetDirectoryPath: `/${noteDirectory}_`,
|
||||
assetFiles: fs.existsSync(assetDirectoryPath)
|
||||
? fs.readdirSync(assetDirectoryPath).map((name) => ({
|
||||
path: `${assetDirectoryPath}/${name}`,
|
||||
name,
|
||||
}))
|
||||
path: `${assetDirectoryPath}/${name}`,
|
||||
name,
|
||||
}))
|
||||
: [],
|
||||
};
|
||||
});
|
||||
@@ -85,10 +85,12 @@ const writeMarkdownAsHtmlToOutputDirectory = (
|
||||
) => {
|
||||
markdownManifest.forEach((m) => {
|
||||
const markdownAsHtml = toHtml(m.markdown, m.publicAssetDirectoryPath);
|
||||
const titleWithoutDashesOrNumbers = (m.name.slice(m.name.indexOf('-') + 1) ?? "").replaceAll('-', ' ');
|
||||
const noteHtmlDocument = noteHtmlTemplate.replace(
|
||||
markdownHtmlReplacementTag,
|
||||
markdownAsHtml
|
||||
);
|
||||
|
||||
).replace("{{title}}", titleWithoutDashesOrNumbers);
|
||||
writeTextAsFile(
|
||||
`${outputDirectory}/${m.directoryName}.html`,
|
||||
noteHtmlDocument
|
||||
|
||||
Reference in New Issue
Block a user