How to customize title to be like these? #31
-
I've found that title of the page is too long to me. I want to modify title of the page to be simple like this: Site main page
(This is same as current) Category/Series/Tags page
(Same as current) Section page
This will only exclude I've done similar thing to {{- with .CurrentSection -}}
<span class="hb-blog-post-section">
<div class="badge bg-secondary text-decoration-none fw-normal">
{{- with .Parent -}}
{{- if and (not .IsHome) (ne .Title "블로그") -}}
<a class="bg-secondary text-decoration-none fw-normal" style="color: var(--hb-badge-color);" href="{{ .RelPermalink }}">{{ .Title }}</a>
<div class="bg-secondary text-decoration-none fw-normal" style="display: inline-block; color: var(--hb-badge-color); opacity: 0.45;"> / </div>
{{- end -}}
{{- end -}}
<a class="bg-secondary text-decoration-none fw-normal" style="color: var(--hb-badge-color);" href="{{ .RelPermalink }}">{{ .Title }}</a>
</div>
</span>
{{- end -}} This will only exclude Post page
This will remove all section information from title. My guess is that I should modify lots of files for this... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
There is an undocumented parameter called params:
title_sections: false |
Beta Was this translation helpful? Give feedback.
-
Customizing a title typically depends on the context in which you want to use it. Here are a few general suggestions for customizing titles: |
Beta Was this translation helpful? Give feedback.
There is an undocumented parameter called
title_sections
of github.com/hugomods/base module, when false, the section titles will not be included into the titles.