File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export function buildSchemas(route: StarlightRouteData) {
1414 const isDocPage = ! isHomepage ;
1515
1616 if ( isHomepage ) {
17+ schemas . push ( buildWebSiteSchema ( ) ) ;
1718 schemas . push ( buildPersonSchema ( ) ) ;
1819 schemas . push ( buildSoftwareApplicationSchema ( ) ) ;
1920 }
@@ -26,6 +27,20 @@ export function buildSchemas(route: StarlightRouteData) {
2627 return schemas ;
2728}
2829
30+ /**
31+ * WebSite schema for homepage (for Google site name feature).
32+ * https://schema.org/WebSite
33+ * https://developers.google.com/search/docs/appearance/site-names
34+ */
35+ function buildWebSiteSchema ( ) {
36+ return {
37+ "@context" : "https://schema.org" ,
38+ "@type" : "WebSite" ,
39+ name : siteConfig . siteName ,
40+ url : siteConfig . siteUrl ,
41+ } ;
42+ }
43+
2944/**
3045 * Person schema for homepage (Jamie Mason as author).
3146 * https://schema.org/Person
You can’t perform that action at this time.
0 commit comments