Skip to content

feat: render posts directly on home page#108

Draft
DariuszPorowski with Copilot wants to merge 4 commits into
mainfrom
copilot/update-home-page-blog-post-listing
Draft

feat: render posts directly on home page#108
DariuszPorowski with Copilot wants to merge 4 commits into
mainfrom
copilot/update-home-page-blog-post-listing

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

The home page previously required a separate click-through to /posts before users could browse articles. This change makes / immediately display the blog index in the same format as /posts, while preserving existing post permalinks.

  • Home page listing parity with /posts

    • Added a dedicated Hugo home template at radblog/layouts/index.html.
    • Home page now renders posts grouped by year using the same list structure/styles as the blog listing page.
  • Permalink behavior unchanged

    • Post links continue to use {{ .RelPermalink }}, so URL structure for individual posts remains unchanged.
  • Implementation shape

    • The template sources post entries from the posts section and paginates grouped yearly output on /.
{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" "posts") -}}
{{ $pager := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}}

{{ range $pager.PageGroups -}}
  <div class="h2">{{ T "post_posts_in" }} {{ .Key }}</div>
  {{ range .Pages -}}
    <h5><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5>
  {{ end -}}
{{ end -}}

Copilot AI changed the title [WIP] Update home page to list blog posts without extra click Render blog posts directly on home page using existing /posts listing layout Jun 3, 2026
Copilot AI requested a review from DariuszPorowski June 3, 2026 18:13
@DariuszPorowski DariuszPorowski changed the title Render blog posts directly on home page using existing /posts listing layout feat: render posts directly on home page Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Static Web App Preview

Environment Deployment
pr108 View workflow run

Deployed from commit 164b12e929633ec6477deb15cfc443175cd2ecb7 via the publisher workflow.

@DariuszPorowski

Copy link
Copy Markdown
Member

@copilot The home page must be exactly like "/posts". Now it's different.

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The home page must be exactly like "/posts". Now it's different.

Updated in commit 164b12e. The homepage now renders using the /posts page context and listing logic so it matches /posts output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home page should list blog posts like /posts, without "click to see posts" step and keep permalinks unchanged

2 participants