Skip to content

Commit 9f214dc

Browse files
authored
feat: add option to disable title capitalization on index (#526)
1 parent 73631a8 commit 9f214dc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

exampleSite/config/_default/params.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ listDateFormat = "2/1/2006"
3030
# postSectionName = "blog"
3131
# relatedPosts = true
3232
# numberOfRelatedPosts = 3
33-
33+
# disableTitleCapitalization = true
3434

3535
reversepagetitle = true # When set to 'true', the Window Title will be reversed to 'Title | Author' instead of the default 'Author | Title'
3636

layouts/index.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ <h2>{{ .Params.mainSectionsTitle }}</h2>
4949
</div>
5050
{{ end }}
5151
<div class="post__content">
52-
<h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
52+
{{ if (eq .Site.Params.disableTitleCapitalization true) }}
53+
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
54+
{{ else }}
55+
<h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
56+
{{ end }}
5357
{{ if .Site.Params.fullPostContent }}
5458
<p>{{ .Content | markdownify }}</p>
5559
{{ else }}

0 commit comments

Comments
 (0)