Skip to content

Commit 6886d4a

Browse files
authored
fix(seo): give the landing page a descriptive document title (#45)
1 parent d8fc686 commit 6886d4a

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎docs/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide:
44
- toc
55
template: landing.html
66
title: Commit Check
7+
seo_title: Commit Check — Commit message & branch name linter for Git
78
description: Catch bad commits before they merge. Messages, branches, authors and AI attribution, checked from your commit hook to every pull request.
89
---
910

‎docs/overrides/main.html‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
{# The landing page sets `title: Commit Check` so its social card and search
44
entry are not labelled "Home". Material appends the site name to any page
5-
that carries a meta title, which on this one page repeats it. #}
5+
that carries a meta title, which on this one page repeats it.
6+
7+
The site name alone says nothing to someone who has not heard of it, and
8+
it is what Google shows as the result's headline, so the landing page can
9+
give its document title separately as `seo_title`. #}
610
{% block htmltitle %}
711
{% if page.is_homepage %}
8-
<title>{{ config.site_name }}</title>
12+
<title>{{ page.meta.seo_title or config.site_name }}</title>
913
{% else %}
1014
{{ super() }}
1115
{% endif %}

0 commit comments

Comments
 (0)