-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.ts
47 lines (41 loc) · 1.18 KB
/
plugins.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
41
42
43
44
45
46
47
import baseBlog from "https://deno.land/x/lume_theme_simple_blog@v0.15.10/mod.ts";
import googleFonts from "lume/plugins/google_fonts.ts";
import { merge } from "lume/core/utils/object.ts";
import type { Options as BaseBlogOptions } from "https://deno.land/x/lume_theme_simple_blog@v0.15.10/mod.ts";
import "lume/types.ts";
export interface Options extends BaseBlogOptions {
fonts?: {
display?: string;
text?: string;
};
}
export const defaults: Options = {
feed: {
output: ["/feed.xml", "/feed.json"],
query: "type=post",
info: {
title: "=metas.site",
description: "=metas.description",
},
items: {
title: "=title",
},
},
fonts: {
display: "https://fonts.google.com/share?selection.family=Bebas+Neue",
text:
"https://fonts.google.com/share?selection.family=Lexend:wght@100..900",
},
};
/** Configure the site */
export default function (userOptions?: Options) {
const options = merge(defaults, userOptions);
return (site: Lume.Site) => {
site.use(baseBlog(options))
.use(googleFonts({
cssFile: "styles.css",
placeholder: "/* google-fonts */",
fonts: options.fonts,
}));
};
}