Skip to content

Commit

Permalink
feat: add option to disable title capitalization on index (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxndrblz authored Nov 17, 2024
1 parent 73631a8 commit 9f214dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ listDateFormat = "2/1/2006"
# postSectionName = "blog"
# relatedPosts = true
# numberOfRelatedPosts = 3

# disableTitleCapitalization = true

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

Expand Down
6 changes: 5 additions & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ <h2>{{ .Params.mainSectionsTitle }}</h2>
</div>
{{ end }}
<div class="post__content">
<h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
{{ if (eq .Site.Params.disableTitleCapitalization true) }}
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ else }}
<h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
{{ end }}
{{ if .Site.Params.fullPostContent }}
<p>{{ .Content | markdownify }}</p>
{{ else }}
Expand Down

0 comments on commit 9f214dc

Please sign in to comment.