Skip to content

Commit 5e41fdd

Browse files
authored
Merge pull request #1375 from gethinode/develop
Apply title case to sections and sidebar menus
2 parents c057b11 + a620900 commit 5e41fdd

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

layouts/partials/assets/section-header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{{- $title := .title -}}
1717
{{- $description := .description -}}
1818
{{- $content := .content -}}
19+
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
1920

2021
<!-- Main code -->
2122
{{ with $title }}<p id="{{ anchorize . }}" class="display-4 py-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}

layouts/partials/assets/sidebar.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
<li class="mb-1">
3838
<div class="d-flex w-100 p-0 sidebar-item-group">
3939
<div class="text-start flex-grow-1 {{ if $current }}fw-bold{{ end }}">
40+
{{- $groupTitle := $group.title -}}
41+
{{ if site.Params.main.titleCase }}{{ $groupTitle = title $groupTitle }}{{ end }}
42+
4043
{{ $dest := $href }}
4144
{{ $target := "" }}
4245
{{ if or $current (not $ref) }}
@@ -45,7 +48,7 @@
4548
<a {{ with $dest }} href="{{ . }}"{{ else }}
4649
data-bs-toggle="collapse"
4750
data-bs-target="#sidebar-collapse-{{ $index }}-{{ $level }}"
48-
{{ end }}>{{ $group.title }}</a>
51+
{{ end }}>{{ $groupTitle }}</a>
4952
</div>
5053

5154
<button

layouts/partials/list/featured.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
{{- $align := .align | default "center" -}}
3434

3535
<div class="text-{{ $align }}">
36-
{{ with $page.Title }}<p class="display-4">{{ . }}</p>{{ end }}
36+
{{ $title := $page.Title }}
37+
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
38+
39+
{{ with $title }}<p class="display-4">{{ . }}</p>{{ end }}
3740
<span class="fs-5 text-muted">{{ $page.Description }}</span>
3841

3942
{{ if $actions }}

layouts/partials/utilities/GetSections.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
4747
{{- end -}}
4848

49+
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
50+
4951
{{- $thumbnail := "" -}}
5052
{{ if reflect.IsMap $sectionPage.Params.Thumbnail }}{{ $thumbnail = $sectionPage.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $sectionPage.Params.Thumbnail }}{{ end }}
5153
{{- $icon := $sectionPage.Params.Icon -}}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gethinode/hinode",
3-
"version": "0.29.0",
3+
"version": "0.29.1",
44
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
55
"keywords": [
66
"hugo",

0 commit comments

Comments
 (0)