summaryrefslogtreecommitdiff
path: root/website/src/components/BlogFeed.astro
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-06-05 09:38:10 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-06-05 09:38:10 +0100
commitf977ee338c7eff240c26c793d7340de4a7b5788b (patch)
treee5803001ec972c176e7a87884455ff2dcad7c6c7 /website/src/components/BlogFeed.astro
parentb5a434c9596f6792f8f574c5641d4cbe1dd5c289 (diff)
Adds Links page and fixes blog feed
Diffstat (limited to 'website/src/components/BlogFeed.astro')
-rw-r--r--website/src/components/BlogFeed.astro11
1 files changed, 8 insertions, 3 deletions
diff --git a/website/src/components/BlogFeed.astro b/website/src/components/BlogFeed.astro
index c507d69..f0c34e7 100644
--- a/website/src/components/BlogFeed.astro
+++ b/website/src/components/BlogFeed.astro
@@ -38,6 +38,7 @@ function sortByPubDateDescending(post1: CollectionEntry<'blog'>, post2: Collecti
}
const headingElem = `h${headingLevel}`;
+const subHeadingElem = `h${headingLevel + 1}`
const canonicalBlogUrl = new URL('blog', Astro.site)
---
@@ -45,12 +46,12 @@ const canonicalBlogUrl = new URL('blog', Astro.site)
<section class="h-feed">
<Fragment set:html={`
<${headingElem} class="p-name">
- My blog
+ My blog
</${headingElem}>
`} />
<aside>
- <p class={hideAuthor ? 'hidden' : ''}>
+ <p hidden={hideAuthor}>
This blog is written by <a class="p-author h-card" href="/">Joe Carstairs</a>
</p>
@@ -60,7 +61,11 @@ const canonicalBlogUrl = new URL('blog', Astro.site)
</aside>
{ distinctYears.map(year => (
- <h3>{year}</h3>
+ <Fragment set:html={`
+ <${subHeadingElem}>
+ ${year}
+ </${subHeadingElem}>
+ `} />
<ul>
{ posts.filter(matchesYear(year)).sort(sortByPubDateDescending).map(post => (
<li class="h-entry">