all repos — homestead @ 56af7664926ddec20dcd59c91655766757a3c369

Code for my website

Clean up according to TS hints

Alan Pearce
commit

56af7664926ddec20dcd59c91655766757a3c369

parent

6ca48aae95475548a081ed0016292abd42dddbe1

1 file changed, 4 insertions(+), 2 deletions(-)

changed files
M src/templates.tssrc/templates.ts
@@ -111,7 +111,7 @@ $(".h-entry .e-content").html(content);
const categories = $(".h-entry .p-categories"); const cat = categories.find(".p-category").parentsUntil(categories); cat.remove(); - for (const tag of file.taxonomies.tags) { + for (const tag of file.taxonomies["tags"]) { categories.append( cat .clone()
@@ -230,7 +230,9 @@ return fs.writeFile("public/tags/index.html", await renderTags([...tags]));
}); for (const tag of tags) { log.debug(`Processing tag ${tag}`); - const matchingPosts = posts.filter((p) => p.taxonomies.tags.includes(tag)); + const matchingPosts = posts.filter((p) => + p.taxonomies["tags"].includes(tag), + ); await fs.mkdir(`public/tags/${tag}`, { recursive: true }); tasks.push(async () => { log.debug(`Rendering tag ${tag} to public/tags/${tag}/index.html`);