blob: d6ed1ab95c28243eda7638cad18690dd13f5a17a (
plain) (
blame)
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
|
import { posts } from "./template/Post.js"
import { pages } from "./template/Base.js"
const postMod = [
]
const pageMod = [
...postMod,
"./content/about.js",
"./content/index.js"
]
const routes = [
...pageMod,
"./content/webmanifest.js",
"./content/robots.js",
"./content/blog.js",
"./content/sitemap.js",
"./content/feed.js",
]
function datecmp(a: { date_mod?: Date| undefined }, b: { date_mod?: Date | undefined }): number {
return (a.date_mod ?? new Date()).valueOf() - (b.date_mod ?? new Date()).valueOf()
}
await Promise.all(postMod.map(mod => import(mod)))
posts.sort(datecmp).reverse()
await Promise.all(pageMod.map(mod => import(mod)))
pages.sort(datecmp).reverse()
await Promise.all(routes.map(mod => import(mod)))
|