惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
B
Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
Vercel News
Vercel News
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
T
Threatpost
Security Latest
Security Latest
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
I
Intezer
P
Privacy International News Feed
D
Docker
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
A
Arctic Wolf
IT之家
IT之家
S
SegmentFault 最新的问题
S
Securelist
博客园 - 叶小钗
N
News and Events Feed by Topic
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
Hacker News: Ask HN
Hacker News: Ask HN
博客园 - Franky
GbyAI
GbyAI
AI
AI
Y
Y Combinator Blog
WordPress大学
WordPress大学
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
N
News | PayPal Newsroom
The Cloudflare Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
I
InfoQ

Hugo - 标签 - cywhat's blog

Failed to Extract Shortcode:template for Shortcode Admonition Not Found Site.webmanifest异常处理 如何创建自己的cdn图床地址 Loveit开启评论功能 Loveit主题开启文章赞赏 Loveit主题的一些美化设置
Hugo的Loveit主题修改sitemap
cywhat · 2022-03-18 · via Hugo - 标签 - cywhat's blog

前景:

要解决的问题是在Hugo自动生成的sitemap.xml文件中(sitemap.xml等于是给搜索引擎看的网站的目录),出现了很多无关的链接,导致无法正确收录,比如说如下图所示:

/img/img50.png

问题:

/img/img51.png

解决:

1.找到/themes/LoveIt/layouts/sitemap.xml文件

原文件内容为:

/img/img52.png

2.修改标记出来的一行

1
  {{- range .Site.RegularPages -}}

3.重新生成静态文件

1
hugo

4.查看sitemap.xml内容

/img/img53.png

5.重新提交代码即可

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏