Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add baseURL variable on See all posts button #38

Merged
merged 3 commits into from
May 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Retuching Code of See all posts button
Apply by changing all publishing buttons to the code suggested by @kusyka911
  • Loading branch information
Rayjun0525 authored May 6, 2023
commit 00c748c353f704bb7ef0c3df0136c469a6cf6003
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