rename files

This commit is contained in:
polv committed 2020-12-15 16:27:52 +07:00
1 parent 1fdaf73f14
commit 31dd2b0049
72 files changed
+10320 -31

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import fs from 'fs'
import path from 'path'
import dotenv from 'dotenv'
dotenv.config({ path: '../../.env' })
dotenv.config()
export const CONTENT_PATH = path.resolve(
process.env.CONTENT_PATH ||
(fs.existsSync('../../_posts') ? '../..' : 'content')
)
export const srcPostPath = (...ps: string[]): string =>
path.join(CONTENT_PATH, '_posts', ...ps)
export const srcMediaPath = (...ps: string[]): string =>
path.join(CONTENT_PATH, '_media', ...ps)
export const builtPath = (...ps: string[]): string =>
path.join(__dirname, '../built', ...ps)
export const dstMediaPath = (...ps: string[]): string =>
path.join(__dirname, '../public/media', ...ps)