diff options
author | Alan Pearce | 2023-09-23 19:34:24 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-23 19:34:24 +0200 |
commit | 84519249928010e18f1f4bf05aaa4297a18fca8c (patch) | |
tree | a4ce3f4a13a538efbc14d1a450bcc83b6fd7b364 | |
parent | 09ea08a2194269f1005b0d08ab4a5a96e203d165 (diff) | |
download | website-84519249928010e18f1f4bf05aaa4297a18fca8c.tar.lz website-84519249928010e18f1f4bf05aaa4297a18fca8c.tar.zst website-84519249928010e18f1f4bf05aaa4297a18fca8c.zip |
Make template names clearer
-rw-r--r-- | src/templates.ts | 4 | ||||
-rw-r--r-- | templates/homepage.html (renamed from templates/index.html) | 0 | ||||
-rw-r--r-- | templates/list.html (renamed from templates/tag.html) | 0 |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/templates.ts b/src/templates.ts index 1006e21..a9fd857 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -48,7 +48,7 @@ async function render404Page(): Promise<string> { async function renderHomepage(posts: Array<Post>): Promise<string> { const file = matter(await Bun.file("content/_index.md").text()); const $ = await layout( - cheerio.load(await Bun.file("templates/index.html").text()), + cheerio.load(await Bun.file("templates/homepage.html").text()), config.title, ); @@ -101,7 +101,7 @@ async function renderPost(file: Post, content: string) { async function renderListPage(tag: string, posts: Post[]) { const $ = await layout( - cheerio.load(await Bun.file("templates/tag.html").text()), + cheerio.load(await Bun.file("templates/list.html").text()), tag || config.title, ); const $feed = $(".h-feed"); diff --git a/templates/index.html b/templates/homepage.html index 1138e04..1138e04 100644 --- a/templates/index.html +++ b/templates/homepage.html diff --git a/templates/tag.html b/templates/list.html index ae5b8e9..ae5b8e9 100644 --- a/templates/tag.html +++ b/templates/list.html |