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

推荐订阅源

C
Cyber Attacks, Cyber Crime and Cyber Security
The Last Watchdog
The Last Watchdog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
W
WeLiveSecurity
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News | PayPal Newsroom
D
DataBreaches.Net
博客园_首页
Y
Y Combinator Blog
F
Fortinet All Blogs
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
C
CERT Recently Published Vulnerability Notes
P
Privacy & Cybersecurity Law Blog
Help Net Security
Help Net Security
S
SegmentFault 最新的问题
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
News and Events Feed by Topic
Schneier on Security
Schneier on Security
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
G
Google Developers Blog
Cyberwarzone
Cyberwarzone
I
Intezer
Google DeepMind News
Google DeepMind News
AWS News Blog
AWS News Blog
C
Check Point Blog
AI
AI
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
博客园 - 司徒正美

Loveit - 分类 - cywhat's blog

Loveit开启评论功能 Loveit主题开启文章赞赏 Loveit主题的一些美化设置
Hugo的Loveit主题修改sitemap
cywhat · 2022-03-18 · via Loveit - 分类 - 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.重新提交代码即可

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏