television

Television Station GTV9 Melbourne Australia

A collection of images, stories and memories.

Home 1956_1969 1970_1979 Reunions Stories Contact

The Heading Tags Test

SEO testing sites recommend that your headings are arranged as h1, h2, h3, etc.

Your main site title (if defined in config.toml) will be formatted with h1 tags by default.

The homepage of a website is often formatted differently than the other pages. The following is an example of a homepage template that uses partial, base templates, and a content file at content/_index.md to populate the {{.Title}} and {{.Content}} page variables. This will format the homepage title as h2.

layouts/index.html

{{ define "main" }}
<main aria-role="main">
<header class="homepage-header">
<h2>{{.Title}}</h2>
 {{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
 </div>
<div>
{{ range first 10 .Site.RegularPages }}
{{ .Render "summary"}}
{{ end }}
</div>
</main>
{{ end }}

The posts/pages titles can be formatted as h2 (or h3) using single.html

layouts/_default/single.html

{{ define "main" }}
<main>
<article>
<header>
    <h2>{{ .Title }}</h2>
</header>
    {{ .Content }}
</article>
<aside>
    {{ .TableOfContents }}
</aside>
</main>
{{ end }}

SEO-page-headings

The Heading Tags Test

SEO testing sites recommend that your headings are arranged as h1, h2, h3, etc.

Your main site title (if defined in config.toml) will be formatted with h1 tags by default.

The homepage of a website is often formatted differently than the other pages. The following is an example of a homepage template that uses partial, base templates, and a content file at content/_index.md to populate the {{.Title}} and {{.Content}} page variables. This will format the homepage title as h2.

layouts/index.html

{{ define "main" }}
<main aria-role="main">
<header class="homepage-header">
<h2>{{.Title}}</h2>
 {{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
 </div>
<div>
{{ range first 10 .Site.RegularPages }}
{{ .Render "summary"}}
{{ end }}
</div>
</main>
{{ end }}

The posts/pages titles can be formatted as h2 (or h3) using single.html

layouts/_default/single.html

{{ define "main" }}
<main>
<article>
<header>
    <h2>{{ .Title }}</h2>
</header>
    {{ .Content }}
</article>
<aside>
    {{ .TableOfContents }}
</aside>
</main>
{{ end }}