mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
Include rev manifest in posts output
This commit is contained in:
parent
194bcaca38
commit
dbce40d195
@ -239,6 +239,8 @@ module.exports = exports = class Manifest {
|
||||
revManifest && fs.writeFile(resolve(REV_MANIFEST), JSON.stringify(revManifest, null, 2)),
|
||||
this.writeManifest(true),
|
||||
]);
|
||||
|
||||
return { revManifest: revManifest || {}, manifest: this.manifest };
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -42,9 +42,11 @@ exports.everything = function (prod = false) {
|
||||
|
||||
|
||||
// prime tweet data for all pages
|
||||
const pages = await primeTweets(PublicFiles.pages.filter((p) => !p.meta.ignore));
|
||||
let pages = await primeTweets(PublicFiles.pages.filter((p) => !p.meta.ignore));
|
||||
pages = pages.filter(Boolean);
|
||||
|
||||
let posts = await primeTweets(PostFiles.pages.filter((p) => !p.meta.ignore));
|
||||
posts = posts.filter(Boolean);
|
||||
posts = sortBy(posts, 'date');
|
||||
posts.reverse();
|
||||
|
||||
@ -68,10 +70,11 @@ exports.everything = function (prod = false) {
|
||||
const cache = new Cache({ prod });
|
||||
await cache.load();
|
||||
await evaluate(tasks.flat(), cache);
|
||||
await cache.save();
|
||||
const { revManifest } = await cache.save();
|
||||
|
||||
const engines = await getEngines(prod);
|
||||
const postIndex = await pageWriter(engines, pages, posts, prod);
|
||||
const postIndex = await pageWriter(prod, engines, pages, posts);
|
||||
postIndex.rev = revManifest;
|
||||
await fs.writeFile(resolve('dist/tweets/index.json'), prod ? JSON.stringify(postIndex) : JSON.stringify(postIndex, null, 2));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user