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

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

Hugo - 分类 - cywhat's blog

Failed to Extract Shortcode:template for Shortcode Admonition Not Found Site.webmanifest异常处理 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.重新提交代码即可

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏