Merge pull request #3287 from LooseLi/dev

修复sitemap多个斜杠导致无法自动编入索引#3260;修复自定义备案链接不生效#3267 #3244
This commit is contained in:
tangly1024
2025-04-11 17:59:57 +08:00
committed by GitHub
11 changed files with 20 additions and 10 deletions

View File

@@ -6,7 +6,11 @@ import { siteConfig } from './config'
* @param {*} param0
*/
export async function generateSitemapXml({ allPages, NOTION_CONFIG }) {
const link = siteConfig('LINK', BLOG.LINK, NOTION_CONFIG)
let link = siteConfig('LINK', BLOG.LINK, NOTION_CONFIG)
// 确保链接不以斜杠结尾
if (link && link.endsWith('/')) {
link = link.slice(0, -1)
}
const urls = [
{
loc: `${link}`,