Skip to content

Commit c0b582c

Browse files
Update site display name
1 parent 7b8bdca commit c0b582c

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

‎docusaurus.config.js‎

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ const siteBaseUrl = normalizeBaseUrl(
3333
process.env.SITE_BASE_URL ||
3434
(githubProject && !isGitHubPagesRoot ? `/${githubProject}/` : "/"),
3535
);
36+
const siteName = "Neoforge 26.1 模组开发教程";
3637

3738
/** @type {import('@docusaurus/types').Config} */
3839
const config = {
39-
title: "NeoForge 26.1",
40-
tagline: "NeoForge 模组开发资料",
40+
title: siteName,
41+
tagline: siteName,
4142
favicon: "img/favicon.png",
4243

4344
url: siteUrl,
@@ -55,6 +56,20 @@ const config = {
5556
locales: ["zh-Hans"],
5657
},
5758

59+
headTags: [
60+
{
61+
tagName: "script",
62+
attributes: {type: "application/ld+json"},
63+
innerHTML: JSON.stringify({
64+
"@context": "https://schema.org",
65+
"@type": "WebSite",
66+
name: siteName,
67+
inLanguage: "zh-CN",
68+
url: new URL(siteBaseUrl, siteUrl).href,
69+
}),
70+
},
71+
],
72+
5873
presets: [
5974
[
6075
"classic",
@@ -90,11 +105,25 @@ const config = {
90105
themeConfig:
91106
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
92107
({
108+
metadata: [
109+
{
110+
name: "description",
111+
content: "面向新手的 Neoforge 26.1 中文模组开发教程。",
112+
},
113+
{
114+
name: "application-name",
115+
content: siteName,
116+
},
117+
{
118+
property: "og:site_name",
119+
content: siteName,
120+
},
121+
],
93122
colorMode: {
94123
respectPrefersColorScheme: true,
95124
},
96125
navbar: {
97-
title: "NeoForge 26.1",
126+
title: siteName,
98127
items: [
99128
{
100129
type: "docSidebar",

0 commit comments

Comments
 (0)