Build the website

This commit is contained in:
Tim Schaub
2022-08-08 19:57:34 -06:00
parent 3a05a73471
commit 9dff55a8ac
46 changed files with 1479 additions and 597 deletions
+26
View File
@@ -0,0 +1,26 @@
import Metalsmith from 'metalsmith';
import inPlace from '@metalsmith/in-place';
import layouts from '@metalsmith/layouts';
import markdown from '@metalsmith/markdown';
import {dirname} from 'node:path';
import {env} from 'node:process';
import {fileURLToPath} from 'node:url';
const baseDir = dirname(fileURLToPath(import.meta.url));
const builder = Metalsmith(baseDir)
.source('./src')
.destination('./build')
.clean(true)
.metadata({
version: env.OL_VERSION || 'dev',
})
.use(inPlace())
.use(markdown())
.use(layouts());
builder.build((err) => {
if (err) {
throw err;
}
});