50 lines
1.0 KiB
TypeScript
50 lines
1.0 KiB
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",
|
|
menuEntry: false,
|
|
},
|
|
{
|
|
path: "src/assets/profile.jpg",
|
|
},
|
|
{
|
|
path: "src/assets/favicon.ico",
|
|
},
|
|
{
|
|
path: "src/assets/base.css"
|
|
},
|
|
{
|
|
path: "src/playground/playground.html",
|
|
nameOverride: "CSS/HTML playground"
|
|
}
|
|
],
|
|
}),
|
|
new StartPagePlugin({
|
|
indexTemplatePath: "src/templates/index.html",
|
|
contentTemplateTag: "{{content}}",
|
|
}),
|
|
])
|
|
.build();
|