deno.land / x / lume_theme_simple_blog@v0.4.0 / 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
48
49
50
51
52
import date from "lume/plugins/date.ts";import postcss from "lume/plugins/postcss.ts";import terser from "lume/plugins/terser.ts";import prism, { Options as PrismOptions } from "lume/plugins/prism.ts";import basePath from "lume/plugins/base_path.ts";import slugifyUrls from "lume/plugins/slugify_urls.ts";import resolveUrls from "lume/plugins/resolve_urls.ts";import metas from "lume/plugins/metas.ts";import pagefind from "lume/plugins/pagefind.ts";import sitemap from "lume/plugins/sitemap.ts";import readingTime from "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/reading_time/mod.ts";
import type { Page, Site } from "lume/core.ts";
export interface Options { prism?: Partial<PrismOptions>;}
/** Configure the site */export default function (options: Options = {}) { return (site: Site) => { site.use(postcss()) .use(basePath()) .use(prism(options.prism)) .use(readingTime()) .use(date()) .use(metas({ defaultPageData: { title: "title", }, })) .use(resolveUrls()) .use(slugifyUrls()) .use(pagefind()) .use(terser()) .use(sitemap()) .copy("fonts") .copy("favicon.png") .preprocess([".md"], (page: Page) => { page.data.excerpt ??= (page.data.content as string).split( /<!--\s*more\s*-->/i, )[0]; });
// Highlight.js stylesheet site.remoteFile( "_includes/css/code.css", "https://cdnjs.cloudflare.com/ajax/libs/prism/9000.0.1/themes/prism-okaidia.min.css", ); };}
lume_theme_simple_blog
Lume theme to create a simple blog
DocumentationDocumentation
GitHub Stars
14

Version Info

Tagged at
2 months ago