GenderDysphoria.fyi/build/post-asset.js

17 lines
345 B
JavaScript
Raw Normal View History

2020-02-29 16:27:55 -08:00
const { without } = require('lodash');
const Asset = require('./asset');
const postmatch = /(\d{4}-\d\d-\d\d)\.\d{4}\.(\w+)/;
module.exports = exports = class PostAsset extends Asset {
_dir (dir) {
dir = dir.replace(postmatch, '$2').split('/');
dir = without(dir, 'posts', '_images');
dir.unshift('p');
return dir;
}
};