mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
Write out a post index into /tweets/index.json. Write out assets for debugging.
This commit is contained in:
@@ -9,6 +9,12 @@ const pkg = require(resolve('package.json'));
|
||||
|
||||
const postmatch = /(\d{4}-\d\d-\d\d)\.\d{4}\.(\w+)/;
|
||||
|
||||
function arrayify (input) {
|
||||
if (!input) return [];
|
||||
if (!Array.isArray(input)) return [ input ];
|
||||
return input;
|
||||
}
|
||||
|
||||
module.exports = exports = class Post extends Page {
|
||||
|
||||
_dir (dir) {
|
||||
@@ -60,6 +66,8 @@ module.exports = exports = class Post extends Page {
|
||||
return result;
|
||||
}, {});
|
||||
|
||||
this.meta.author = this.meta.author && arrayify(this.meta.author) || [];
|
||||
|
||||
this.classes.push('post');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user