Skip to content

Commit

Permalink
Retuching Code of See all posts button
Browse files Browse the repository at this point in the history
Apply by changing all publishing buttons to the code suggested by @kusyka911
  • Loading branch information
Rayjun0525 committed May 6, 2023
1 parent 452f899 commit 00c748c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ <h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
{{ end }}
{{ if gt (len $posts) 5 }}
<p>
<a href="{{ .Site.Home.Permalink }}posts/">See all posts</a>
{{ range $firstSection := (where .Site.Sections "Section" "in" (first 1 (.Site.Params.mainSections))) }}
<a href="{{ $firstSection.Permalink }}">See all posts</a>
{{ end }}
</p>
{{ end }}
</main>
Expand Down

0 comments on commit 00c748c

Please sign in to comment.