This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
site/scripts/symlink.js

14 lines
293 B
JavaScript

const fs = require('fs')
const process = require('process')
const path = require('path')
const notesSymlink = path.join(process.cwd(), 'src/notes')
if (!fs.existsSync(notesSymlink)) {
fs.symlinkSync(
path.join(process.cwd(), '../content/notes'),
notesSymlink,
'junction'
)
}