diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/templates.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/templates.ts b/src/templates.ts index 84ae695..8099065 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -111,7 +111,7 @@ async function renderPost(file: Post, content: string) { 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"].sort()) { categories.append( cat .clone() @@ -230,7 +230,10 @@ export default async function generateSite() { await fs.mkdir("public/tags", { recursive: true }); tasks.push(async () => { log.debug("Rendering tags page to public/tags/index.html"); - return fs.writeFile("public/tags/index.html", await renderTags([...tags])); + return fs.writeFile( + "public/tags/index.html", + await renderTags([...tags].sort()), + ); }); for (const tag of tags) { log.debug(`Processing tag ${tag}`); |