mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 15:26:17 +00:00
22 lines
518 B
JavaScript
22 lines
518 B
JavaScript
|
const glob = require('./lib/glob');
|
||
|
const { ROOT, KIND } = require('./resolve');
|
||
|
const File = require('./file');
|
||
|
const Asset = require('./post-asset');
|
||
|
const Post = require('./post');
|
||
|
const Files = require('./files');
|
||
|
|
||
|
class PostFiles extends Files {
|
||
|
_kindMap () {
|
||
|
return {
|
||
|
[KIND.PAGE]: Post,
|
||
|
[KIND.ASSET]: Asset,
|
||
|
[KIND.OTHER]: File,
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = exports = async function loadPublicFiles () {
|
||
|
return new PostFiles(await glob('posts/**/*', { cwd: ROOT, nodir: true }));
|
||
|
};
|
||
|
|