From d121de53097c0479beb3861c3cc354d95a652609 Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Thu, 25 Mar 2021 14:05:29 -0700 Subject: [PATCH] Add disclaimer to the longform page --- build/_concats.js | 5 +++-- build/page-concatinator.js | 2 ++ build/resolve.js | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/_concats.js b/build/_concats.js index fdeaa5a..f2f4077 100644 --- a/build/_concats.js +++ b/build/_concats.js @@ -1,7 +1,7 @@ module.exports = exports = [ { - output: '/gdb/printable.md', + output: 'public/gdb/printable.md', sources: [ 'public/gdb/index.md', 'public/gdb/what-is-gender.md', @@ -25,7 +25,8 @@ module.exports = exports = [ meta: { title: 'The Gender Dysphoria Bible', description: 'A dive into the multitude of ways that gender dysphoria manifests and what it means to be transgender.', - classes: [ 'longform' ], + classes: [ 'gdb', 'longform' ], + preBody: '_disclaimer', }, }, ]; diff --git a/build/page-concatinator.js b/build/page-concatinator.js index b444f7d..cd4f9e8 100644 --- a/build/page-concatinator.js +++ b/build/page-concatinator.js @@ -1,5 +1,6 @@ const Page = require('./page'); +const { resolveDir } = require('./resolve'); function isDate (input) { return input instanceof Date; } @@ -20,6 +21,7 @@ module.exports = exports = function (pages, target, paths, meta) { } const result = new CombinedPage(target); + result.cwd = resolveDir(target); result.source = ''; result.meta = {}; result.dateCreated = new Date(); diff --git a/build/resolve.js b/build/resolve.js index 55c7b86..1245d52 100644 --- a/build/resolve.js +++ b/build/resolve.js @@ -140,6 +140,10 @@ exports.resolve = function resolve (...args) { return path.resolve(ROOT, fpath, ...args); }; +exports.resolveDir = function resolveDir (...args) { + return path.dirname(exports.resolve(...args)); +}; + exports.relative = function relative (fpath) { return path.relative(ROOT, fpath); };