Add disclaimer to the longform page

This commit is contained in:
Jocelyn Badgley (Twipped) 2021-03-25 14:05:29 -07:00
parent b919a7cf11
commit d121de5309
3 changed files with 9 additions and 2 deletions

View File

@ -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',
},
},
];

View File

@ -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();

View File

@ -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);
};