Skip to content

Commit

Permalink
Allow for personalized titles for Blog and Note pages (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
maiani authored Jul 30, 2024
1 parent 05dce9c commit d032953
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/navigators/navbar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{/* variables for enabling/disabling various features */}}
{{ $blogEnabled := site.Params.features.blog.enable | default false }}
{{ $blogTitle := site.Params.features.blog.title | default (i18n "posts") }}
{{ $notesEnabled := site.Params.features.notes.enable | default false }}
{{ $notesTitle := site.Params.features.notes.title | default (i18n "notes") }}
{{ $maxVisibleSections := site.Params.topNavbar.maxVisibleSections | default 5 }}

{{/* keep backward compatibility for blog post */}}
Expand Down Expand Up @@ -121,12 +123,12 @@
{{ end }}
{{ if $blogEnabled }}
<li class="nav-item">
<a class="nav-link" id="blog-link" href="{{ path.Join (site.BaseURL | relLangURL) "posts" }}">{{ i18n "posts" }}</a>
<a class="nav-link" id="blog-link" href="{{ path.Join (site.BaseURL | relLangURL) "posts" }}">{{ $blogTitle }}</a>
</li>
{{ end }}
{{ if $notesEnabled }}
<li class="nav-item">
<a class="nav-link" id="note-link" href="{{ path.Join (site.BaseURL | relLangURL) "notes" }}">{{ i18n "notes" }}</a>
<a class="nav-link" id="note-link" href="{{ path.Join (site.BaseURL | relLangURL) "notes" }}">{{ $notesTitle }}</a>
</li>
{{ end }}
{{ range $customMenus }}
Expand Down

0 comments on commit d032953

Please sign in to comment.