-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
The Hero interface
docs say:
// The main text for the hero section. This will be defined
// ash1
tag.
text: string
However, this is not what it is doing. Instead it is rendering Hero.name
as <h1>
, and Hero.text
is just a plain <p>
. This leads to bad SEO scores (e.g. in SEO checkers), due to name
being too short, often just a single word (the "product" name).
Reproduction
Check DOM output in any VitePress site using the default theme, e.g. https://vitepress.dev/:
document.querySelector('h1').innerText; // evaluates to 'VitePress'
Expected behavior
h1 should include Hero.text
as documented.
I think ideally it could wrap around both name
and text
(without changing any existing styling), maybe with a visually hidden dash separating them, so for SEO and a11y the h1 of e.g. vitepress.dev would be "VitePress - Vite & Vue Powered Static Site Generator"
.
System Info
n/a
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.