-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_config.ts
40 lines (33 loc) · 1.06 KB
/
_config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import lume from "lume/mod.ts";
import plugins from "./lib/plugins.ts";
import { redirects, router, cacheBusting, notFound } from "./lib/middleware.ts";
const site = lume({
src: "./content",
location: new URL("https://hirefrank.com"),
server: {
middlewares: [
redirects,
router,
notFound(),
cacheBusting(),
],
},
});
const pageConfigs: Array<{ path: string; layout: string; tags?: string[]; indexable?: boolean }> = [
{ path: "/pages", layout: "simple.vto" },
{ path: "/writings", layout: "simple.vto", tags: ["writing"] },
{ path: "/videos", layout: "simple.vto", tags: ["video"], indexable: true },
];
pageConfigs.forEach(({ path, layout, tags, indexable }) => {
site.data("layout", layout, path);
if (tags) site.data("tags", tags, path);
if (indexable) site.data("indexable", indexable, path);
});
site.data('cacheBusterVersion', `v${Date.now()}`);
site.data("site", {
title: "Frank Harris",
name: "hirefrank",
description: "Frank Harris's personal website.",
});
site.use(plugins());
export default site;