Skip to content

Commit

Permalink
sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Aug 29, 2024
1 parent a6d6127 commit 053fc65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { siteConfig } from '@/lib/config'
import { getGlobalData, getPostBlocks } from '@/lib/db/getSiteData'
import { generateRobotsTxt } from '@/lib/robots.txt'
import { generateRss } from '@/lib/rss'
import { generateSitemapXml } from '@/lib/sitemap.xml'
import { getLayoutByTheme } from '@/themes/theme'
import { useRouter } from 'next/router'

Expand Down Expand Up @@ -62,6 +63,8 @@ export async function getStaticProps(req) {
generateRobotsTxt(props)
// 生成Feed订阅
generateRss(props)
// 生成
generateSitemapXml(props)

// 生成全文索引 - 仅在 yarn build 时执行 && process.env.npm_lifecycle_event === 'build'

Expand Down

0 comments on commit 053fc65

Please sign in to comment.