plan for ssg
This commit is contained in:
1 parent
a8867be72c
commit
fb69b2710f
73 files changed
+921
-718
No files matched your search
@@ -1,9 +1,10 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
import yaml from 'js-yaml'
|
||||
import * as z from 'zod'
|
||||
|
||||
import { buildPath } from './dir'
|
||||
|
||||
export const THEME_FILENAME = 'theme.yml'
|
||||
|
||||
export const zTheme = z
|
||||
@@ -56,6 +57,6 @@ export type ITheme = z.infer<typeof zTheme>
|
||||
|
||||
export function getTheme() {
|
||||
return zTheme.parse(
|
||||
yaml.safeLoad(fs.readFileSync(path.join('built', THEME_FILENAME), 'utf-8'))
|
||||
yaml.safeLoad(fs.readFileSync(buildPath(THEME_FILENAME), 'utf-8'))
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user