-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.ts
110 lines (84 loc) · 2.19 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import Lume from "lume/mod.ts"
import MDX from "lume/plugins/mdx.ts"
import MdxOption from "./mdx.config.ts"
import Esbuild from "lume/plugins/esbuild.ts"
import JsxPreact from "lume/plugins/jsx_preact.ts"
import Highlight from "lume/plugins/code_highlight.ts"
import Postcss from "lume/plugins/postcss.ts"
import Tailwind from "lume/plugins/tailwindcss.ts"
import TailwindOption from "./tailwind.config.ts"
import Sass from "lume/plugins/sass.ts"
import Toml from "lume/plugins/toml.ts"
import Feed from "lume/plugins/feed.ts"
import Sitemap from "lume/plugins/sitemap.ts"
import ReadingInfo from "lume/plugins/reading_info.ts"
import ImageDimension from "./_plugins/ImageDimension.ts"
import { ImageExtensions } from "@lib/extension.ts"
import ExternalLink from "./_plugins/ExternalLink.ts"
import Meta from "lume/plugins/metas.ts"
import Sri from "lume/plugins/sri.ts"
import Pagefind from "lume/plugins/pagefind.ts"
const site = Lume( {
src: "src",
location: new URL( "https://leb.418.im/" ),
} )
/**
* Plugins
*/
site.use( Toml() )
site.use( JsxPreact() )
site.use( MDX( MdxOption ) )
site.use( Highlight( {
theme: {
name: "base16/github",
path: "/_includes/base16_github.css"
}
} ) )
site.use( Tailwind( {
options: TailwindOption
} ) )
site.use( Sass() )
site.use( Postcss() )
site.use( Esbuild() )
site.use( Sitemap() )
site.use( ImageDimension() )
site.use( ExternalLink() )
site.use( ReadingInfo( {
extensions: [ ".md", ".mdx" ]
} ) )
site.use( Feed( {
output: "/feed.xml",
query: "type=post",
info: {
title: "LowEffortBlog",
},
items: {
updated: data => new Date( data.updated )
}
} ) )
site.use( Meta())
site.use( Sri() )
site.use( Pagefind( {
ui: {
containerId: "pagefind-search",
showSubResults: true,
translations: {
placeholder: "Press '/' to search"
}
},
indexing: {
forceLanguage: "ja"
}
} ) )
/**
* Data
*/
site.data( "site_title", "LowEffortBlog" )
site.data( "git_repo", "https://github.com/MidAutumnMoon/LowEffortBlog" )
/**
* Static assets
*/
site.copy( "public", "." )
site.copy( ImageExtensions )
site.copy( [".svg"] )
export default site