Use CONFIG.SITE.title for h1 in doc theme header (#2449)

Use SITE.title specified in config.ts as the h1 heading in Header.astro
of doc theme.
When SITE.title is null, use "Documentation" as the fallback value.
Previously the h1 heading in doc theme header is hardcoded
as "Documentation".
This commit is contained in:
Jang Rush 2022-01-24 23:35:19 +08:00 committed by GitHub
parent 20dc304172
commit 9757cd869b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ const lang = currentPage && getLanguageFromURL(currentPage);
<div class="logo flex">
<AstroLogo size={40} />
<a href="/">
<h1>Documentation</h1>
<h1>{CONFIG.SITE.title ?? "Documentation"}</h1>
</a>
</div>
<div style="flex-grow: 1;"></div>