File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ function genConfig() {
65
65
HideLastUpdated,
66
66
HideAuthors,
67
67
rootDir,
68
+ hostName,
68
69
} = themeConfig
69
70
const additionalNav = [
70
71
{
@@ -114,6 +115,9 @@ function genConfig() {
114
115
lang : 'zh-CN' ,
115
116
title : siteTitle ,
116
117
base : baseUrl ,
118
+ sitemap : {
119
+ hostname : hostName ,
120
+ } ,
117
121
cleanUrls : true ,
118
122
markdown : {
119
123
config ( md ) {
@@ -164,6 +168,9 @@ function genConfig() {
164
168
// https://vitepress.dev/reference/default-theme-config
165
169
siteTitle : SiteTitle ,
166
170
logo : siteLogo ,
171
+ sitemap : {
172
+ hostname : hostName ,
173
+ } ,
167
174
nav : combinedNav ,
168
175
sidebar : generateSidebar ( ) ,
169
176
socialLinks : [ { icon : 'github' , link : githubRepoLink } ] ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export interface ThemeContext {
22
22
HideReadingTime ?: boolean
23
23
HideLastUpdated ?: boolean
24
24
HideAuthors ?: boolean
25
+ hostName : string
25
26
}
26
27
27
28
const themeContext = new AsyncLocalStorage < ThemeContext > ( )
You can’t perform that action at this time.
0 commit comments