作者 xiaoqiu

更改为文件静态地图

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: true,
runtimeConfig: {
public: {
baseUrl: process.env.NUXT_API_URL,
... ... @@ -12,12 +13,12 @@ export default defineNuxtConfig({
],
devServer: {
host: 'localhost',
port: 3000
port: 3666
},
nitro: {
devProxy: {
'/dev-api': {
target: 'http://htai.toolsai.cc/',
target: 'http://192.168.2.220:35273/',
changeOrigin: true,
}
... ... @@ -25,14 +26,14 @@ export default defineNuxtConfig({
// 该配置用于服务端请求转发
routeRules: {
'/dev-api/**': {
proxy: 'http://htai.toolsai.cc/**'
proxy: 'http://192.168.2.220:35273/**'
},
},
prerender: {
routes: ['/sitemap.xml'],
// 从预渲染中排除 sitemap.xml,让它动态生成
ignore: ['/sitemap.xml']
}
// prerender: {
// routes: ['/sitemap.xml'],
// // 从预渲染中排除 sitemap.xml,让它动态生成
// ignore: ['/sitemap.xml']
// }
},
css: [
'~/assets/iconfonts/iconfont.css',
... ...
User-agent: Amazonbot
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: AwarioRssBot
User-agent: AwarioSmartBot
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: cohere-ai
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: Diffbot
Disallow: /
User-agent: FacebookBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: magpie-crawler
Disallow: /
User-agent: NewsNow
Disallow: /
User-agent: news-please
Disallow: /
User-agent: omgili
Disallow: /
User-agent: omgilibot
Disallow: /
User-agent: peer39_crawler
User-agent: peer39_crawler/1.0
Disallow: /
User-agent: Scrapy
Disallow: /
User-agent: TurnitinBot
Disallow: /
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-log/
Disallow: /wp-includes/
Disallow: /bookmark/
Disallow: /go/
Disallow: /user
Disallow: /hotnews
Disallow: /?s=*
Disallow: /search/
Disallow: /search?q=
Sitemap: https://www.toolsai.cc/sitemap.xml
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.toolsai.cc</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-writing-tools</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-image-generators</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-image-background-removers</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-image-big</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-image-repair</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-video-tools</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-agent</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-chatbots</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-programming-tools</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-design-tools</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-audio-tools</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-search-engines</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-frameworks</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-study</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-models</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-model-evaluation</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-content</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/category/ai-directive</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/16</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/24</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/23</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/22</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/21</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/20</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/19</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/18</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/17</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/8</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/15</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/14</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/13</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/12</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/11</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/10</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.toolsai.cc/details/9</loc>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
</urlset>
\ No newline at end of file
... ...
// server/routes/sitemap.xml.ts
export default defineEventHandler(async (event) => {
const res = await $fetch('http://htai.toolsai.cc/sitemap.xml', {
method: 'get'
})
event.node.res.setHeader('content-type', 'text/xml')
return res
})
\ No newline at end of file