diff options
| author | Joe Carstairs <me@joeac.net> | 2026-04-25 13:05:40 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-04-25 13:05:40 +0100 |
| commit | ac8011ddb1f5f6c0f54fbb877ed11725e6b4490a (patch) | |
| tree | 34edc199c276e757ffc1b3d86c73324d5726168c /website | |
| parent | d98908ad5c21343f5f2359c151853c1df5f779b4 (diff) | |
blog feed: entries are subheadings
Diffstat (limited to 'website')
| -rw-r--r-- | website/src/components/BlogFeed.astro | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/website/src/components/BlogFeed.astro b/website/src/components/BlogFeed.astro index af61dca..552fff4 100644 --- a/website/src/components/BlogFeed.astro +++ b/website/src/components/BlogFeed.astro @@ -46,6 +46,7 @@ function pubDate(post: CollectionEntry<'blog'>): Date { const HeadingElem = `h${headingLevel} class="p-name"`; const SubHeadingElem = `h${headingLevel + 1}`; +const SubSubHeadingElem = `h${headingLevel + 2}`; const AuthorElem = `p${hideAuthor ? " hidden" : ""}`; const canonicalBlogUrl = new URL('blog', Astro.site) @@ -72,7 +73,9 @@ const canonicalBlogUrl = new URL('blog', Astro.site) ? <ul> { posts.sort(sortByPubDateDescending).map(post => ( <li class="h-entry"> - <a class="u-url p-name" href={`/blog/${post.id}`}>{post.data.title}</a> + <SubSubHeadingElem> + <a class="u-url p-name" href={`/blog/${post.id}`}>{post.data.title}</a> + </SubSubHeadingElem> <p class="p-summary" set:html={post.data.description} /> <FormattedDate className="dt-published" date={pubDate(post)} /> </li> @@ -83,7 +86,9 @@ const canonicalBlogUrl = new URL('blog', Astro.site) <ul> { posts.filter(matchesYear(year)).sort(sortByPubDateDescending).map(post => ( <li class="h-entry"> - <a class="u-url p-name" href={`/blog/${post.id}`}>{post.data.title}</a> + <SubSubHeadingElem> + <a class="u-url p-name" href={`/blog/${post.id}`}>{post.data.title}</a> + </SubSubHeadingElem> <p class="p-summary" set:html={post.data.description} /> <FormattedDate className="dt-published" date={pubDate(post)} /> </li> |
