Added document title and fixed viewport size

This commit is contained in:
2025-10-04 18:00:27 +02:00
parent 2ef2f5d974
commit 11298411bd
4 changed files with 11 additions and 6 deletions

View File

@@ -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