mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
update imports and define __filename and __dirname
This commit is contained in:
parent
21ad72400d
commit
fc47be65ea
@ -1,13 +1,18 @@
|
||||
import { QuartzConfig } from "./quartz/cfg"
|
||||
import * as Plugin from "./quartz/plugins"
|
||||
import * as fs from "fs"
|
||||
import * as path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
|
||||
/**
|
||||
* Quartz 4.0 Configuration
|
||||
*
|
||||
* See https://quartz.jzhao.xyz/configuration for more information.
|
||||
*/
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const configPath = process.env.QUARTZ_CONFIG_PATH || path.resolve(__dirname, "config.json")
|
||||
|
||||
const rawData = fs.readFileSync(configPath, "utf-8")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user