Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何添加额外的协议 #305

Open
freezyh opened this issue Jul 2, 2024 · 3 comments
Open

如何添加额外的协议 #305

freezyh opened this issue Jul 2, 2024 · 3 comments

Comments

@freezyh
Copy link

freezyh commented Jul 2, 2024

例如:
<?xml version="1.0"encoding="UTF-8" ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/"> <url> <loc>http://m.abc.com/index.html</loc> <mobile:mobiletype="mobile"/> <lastmod>2009-12-14</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url>

我想添加 urlset 中添加xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/ 在 标签中添加

版本:"@nuxtjs/sitemap": "^2.4.0"

@harlan-zw
Copy link
Collaborator

harlan-zw commented Jul 3, 2024

Hi, your best bet, for now, is to use the sitemap:output Nitro hook.

I may consider adding a nicer way to handle this in the future but I'm not familiar with this directive.

@freezyh
Copy link
Author

freezyh commented Jul 4, 2024

@freezyh
Copy link
Author

freezyh commented Jul 4, 2024

如果要添加mobile:mobiletype="mobile"/
sitemap: { xmlNs: 'xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/"', // 默认的配置 defaults: { mobile: 'mobile', } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants