mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 23:16:52 +00:00
sitemap,robots支持NOTION_CONFIG
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
|
||||
import fs from 'fs'
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from './config'
|
||||
|
||||
export async function generateRobotsTxt() {
|
||||
export async function generateRobotsTxt(NOTION_CONFIG) {
|
||||
const LINK = siteConfig('LINK', '', NOTION_CONFIG)
|
||||
const content = `
|
||||
# *
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
# Host
|
||||
Host: ${BLOG.LINK}
|
||||
Host: ${LINK}
|
||||
|
||||
# Sitemaps
|
||||
Sitemap: ${BLOG.LINK}/sitemap.xml
|
||||
Sitemap: ${LINK}/sitemap.xml
|
||||
|
||||
`
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user