Add titleclass page param

master
Will Faught 2 years ago
parent 2e43188ee8
commit 7b3d81cdab

@ -291,6 +291,7 @@ paige:
method: "resize" # Hugo image processing method; values are "crop", "fill", "fit", "resize"; default is "resize"
options: "550x webp picture Lanczos" # Hugo image processing options; default is "550x webp picture Lanczos"
math: true # Enable math typesetting with KaTeX
titleclass: display-5 fw-bold text-center # Page title class attribute value
toc: true # Show a table of contents if there are any headers
```

@ -4,6 +4,8 @@ description: Go ahead, touch the Cornballer
greeting: You know [best](https://www.youtube.com/watch?v=1WDW8XKEGgU)
image_stretch: true
image_url: stretch.webp
paige:
titleclass: display-1 fw-bold text-center
title: No Borders, No Limits
---

@ -1,10 +1,6 @@
{{ if .Title }}
{{ $class := "display-5" }}
{{ $class := .Params.paige.titleclass | default "display-5 fw-bold text-center" }}
{{ $title := .Title | markdownify }}
{{ if .IsHome }}
{{ $class = "display-1" }}
{{ end }}
<h1 class="{{ $class }} fw-bold text-center">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
<h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
{{ end }}

Loading…
Cancel
Save