diff options
author | Florrie <towerofnix@gmail.com> | 2018-11-15 16:54:57 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-11-15 16:54:57 -0400 |
commit | ec88b988d21f7ab8b8825c40fc77a661ad306a6d (patch) | |
tree | cc3ccb6e19693c8d1d31a676000666ebfa14e00b /build.js | |
parent | 5f98681a1760134a14bcf534033dbe30be3fd38a (diff) |
Inktober 2/3
Diffstat (limited to 'build.js')
-rw-r--r-- | build.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build.js b/build.js index a6efc7d..2be227c 100644 --- a/build.js +++ b/build.js @@ -84,6 +84,11 @@ async function build() { const posts = await Promise.all(postFiles.map( f => readFile('site/posts/' + f, 'utf-8').then(parsePostText) .then(post => { + if (post.config.permalink) { + console.error(`\n\x1b[1mWarning!\x1b[0m ${f} still has a manually-set permalink.`) + } + + post.config.permalink = path.basename(f, '.md') parsedPostCount++ process.stdout.write(`\r${Math.floor(parsedPostCount / postFiles.length * 100)}%`) return Object.assign(post, {sourceFile: f}) |