mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add capitalize automatic headings config at params.page.heading.capitalize (#421)
This commit is contained in:
@@ -694,6 +694,8 @@ enableEmoji = true
|
||||
closeComment = false
|
||||
# FixIt 0.3.0 | NEW page heading config
|
||||
[params.page.heading]
|
||||
# FixIt 0.3.3 | NEW whether to capitalize automatic text of headings
|
||||
capitalize = false
|
||||
# used with `markup.tableOfContents.ordered` parameter
|
||||
[params.page.heading.number]
|
||||
# whether to enable auto heading numbering
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
{{- $title = replace $title "{h6}" $h6 -}}
|
||||
{{- $title = replace $title "{title}" .Text -}}
|
||||
{{- end -}}
|
||||
{{- if $params.heading.capitalize -}}
|
||||
{{- $title = replace $title .PlainText (title .PlainText) -}}
|
||||
{{- end -}}
|
||||
<span>{{ $title | safeHTML }}</span>
|
||||
<a href="#{{ .Anchor | safeURL }}" class="heading-mark">
|
||||
<svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.5" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.6-RC" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
Reference in New Issue
Block a user