Files
blog/src/index.ts
2025-09-18 14:44:35 +02:00

44 lines
929 B
TypeScript

import {
ToolchainBuilder,
Paths,
FileLoader,
MarkdownLoader,
StartPagePlugin,
} from "@zblog/toolchain";
const paths: Paths = {
outputDirectory: "dist",
};
new ToolchainBuilder(paths)
.addPlugins([
new MarkdownLoader({
rootPath: "src/notes",
assetsDirectoryName: "assets",
markdownHtmlReplacementTag: "{{markdown}}",
noteFileName: "note.md",
noteHtmlTemplatePath: `src/templates/note.html`,
imageWidth: 800,
}),
new FileLoader({
files: [
{
path: "src/templates/404.html",
nameOverride: "Not Found Page",
menuEntry: false,
},
{
path: "src/assets/profile.jpg",
},
{
path: "src/assets/favicon.ico",
}
],
}),
new StartPagePlugin({
indexTemplatePath: "src/templates/index.html",
contentTemplateTag: "{{content}}",
}),
])
.build();