geeksforsocialchange / gfsc-v3

GFSC website made in Hugo
https://gfsc.studio
1 stars 2 forks source link

Change title tags to `<h1>` tags #339

Closed ivan-kocienski-gfsc closed 1 year ago

ivan-kocienski-gfsc commented 1 year ago

Fixes #308

Description

Use correct <h1> tags on pages to improve accessibility and SEO.

Pages fixed

Other pages

@geeksforsocialchange/developers

aaaaargZombies commented 1 year ago

we're missing a first level heading or really any heading on the blog index. this is missing from the design / current website.

r-ferrier commented 1 year ago

Sorry I've just been trying to work out how to add a blog header while reviewing this! Something like this in the header is close, but how we apply styles to h1 headers would need changing to accommodate this so it's not a good plan for now. Leaving here anyway in case is of any use in the future.

{{ if and (in $currentPage.RelPermalink "blog") (and (eq $currentPage.RelPermalink "/blog/") (eq .Name "Blog")) }}
  <h1 class="header__nav nav">
    <a href="{{ .URL }}">{{ .Name }}</a>
  </h1>
{{ else }}
  <a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}