1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Added support for loading posts

This commit is contained in:
Jocelyn Badgley (Twipped)
2020-02-29 16:27:55 -08:00
parent 56d5f33453
commit 27621e0edd
10 changed files with 216 additions and 88 deletions

View File

@@ -28,19 +28,19 @@ module.exports = exports = class File {
file.basename = basename = basename.slice(1);
}
// remove the public root and any _images segment from the dir
const dir = this._dir(file.dir);
this.kind = kind(filepath);
this.type = type(filepath);
this.input = filepath; // public/file.ext
this.cwd = file.dir;
this.ext = this.preprocessed ? file.ext : normalizedExt(file.ext);
this.input = filepath; // public/file.ext
this.base = path.join(...dir); // '', 'folder', 'folder/subfolder'
this.dir = path.join('/', ...dir); // /, /folder, /folder/subfolder
this.name = name; // index, fileA, fileB
this.basename = basename; // index.ext, fileA.ext, fileB.ext
this.ext = file.ext;
const dir = this._dir(file.dir);
if (dir) {
this.base = path.join(...dir); // '', 'folder', 'folder/subfolder'
this.dir = path.join('/', ...dir); // /, /folder, /folder/subfolder
}
this._out();