Compare commits

..

2 Commits

Author SHA1 Message Date
e51c96a472 Deployed a3efc6c with MkDocs version: 1.6.1 2025-07-15 15:54:08 +00:00
d9e6febb1c Deployed 85a3921 with MkDocs version: 1.6.1 2025-07-15 15:52:54 +00:00
65 changed files with 8226 additions and 66 deletions

View File

@ -824,6 +824,8 @@
@ -892,6 +894,36 @@
<li class="md-nav__item">
<a href="../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -825,6 +825,8 @@
@ -893,6 +895,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -826,6 +826,8 @@
@ -894,6 +896,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -824,6 +824,8 @@
@ -892,6 +894,36 @@
<li class="md-nav__item">
<a href="../../../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -840,6 +840,8 @@
@ -908,6 +910,36 @@
<li class="md-nav__item">
<a href="../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -841,6 +841,8 @@
@ -907,6 +909,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -2946,6 +2978,56 @@
</div>
</div>
</div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkdocsfont/">自定义Mkdocs显示字体(霞鹜文楷)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/linktech/">如何给MKdocs添加友链</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs3/">解决Github Pages部署mkdocs自定义域名失效的问题</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -911,6 +911,8 @@
@ -979,6 +981,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -2778,6 +2810,57 @@ MkDocs中文文档: <a href="https://hellowac.github.io/mkdocs-docs-zh/">MkDocs
<li><a href="https://zhuanlan.zhihu.com/p/383582472">Mkdocs 配置和使用</a></li>
<li><a href="https://github.com/marketplace/actions/deploy-mkdocs">Deploy MkDocs</a></li>
</ol>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/">Mkdocs教程前言</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/">为网站添加评论系统</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkdocsfont/">自定义Mkdocs显示字体(霞鹜文楷)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
</ul>
</div>
<div class="footnote">
<hr />
<ol>

View File

@ -1052,6 +1052,8 @@
@ -1120,6 +1122,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -4065,6 +4097,56 @@ javascripts/mathjax.js里有对数学公式的扩展 </p>
<p><a href="../../websitebeauty/linktech/">添加友链</a></p>
<p><a href="../../websitebeauty/mkcomments/">添加评论系统</a> </p>
<p><a href="../../websitebeauty/time/">为MKdocs添加文章修订时间戳</a></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">Mkdocs 阅读时间插件</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocsblog/">网站添加Mkdocs博客</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/">Mkdocs教程前言</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -840,6 +840,8 @@
@ -908,6 +910,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -2433,6 +2465,56 @@
<p class="admonition-title">原因</p>
<p>因为每次在 Custom domain 添加后都会给我们生成一个 CNAME 的文件,但是因为项目我们没有 pull 到本地,所以造成了,每次 push 之后 CNAME 信息被 clear 了</p>
</div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/linktech/">如何给MKdocs添加友链</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocsblog/">网站添加Mkdocs博客</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -834,6 +834,8 @@
@ -900,6 +902,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -2476,6 +2508,56 @@
<a id="__codelineno-3-5" name="__codelineno-3-5"></a> avatar: https://s1.imagehub.cc/images/2024/02/02/91a767e93d1a344e44c69936464c583e.png # Author avatar
</code></pre></div></td></tr></table></div>
结束</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -920,6 +920,8 @@
@ -988,6 +990,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">
@ -2672,6 +2704,56 @@ Mkdocs Materials 教程:
</code></pre></div></td></tr></table></div>
<h2 id="_5">加入友链<a class="headerlink" href="#_5" title="Permanent link">&para;</a></h2>
<p><a class="md-button" href="https://wcowin.work/link/#_3" target="“_blank”">友链申请 <img alt="🤲🏻" class="twemoji" src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f932-1f3fb.svg" title=":palms_up_together_tone1:" /></a></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">Mkdocs 阅读时间插件</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -828,6 +828,8 @@
@ -896,6 +898,36 @@
<li class="md-nav__item">
<a href="../../websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="websitebeauty/reading_time/" class="md-nav__link">

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -3595,6 +3627,56 @@
<a id="__codelineno-3-413" name="__codelineno-3-413"></a><span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
</details>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -18,7 +18,7 @@
<link rel="prev" href="../../Mkdocs/mkdocs3/">
<link rel="next" href="../reading_time/">
<link rel="next" href="../recommend/">
<link rel="icon" href="https://s2.loli.net/2025/02/12/aE5ovtzAlNTd9Uh.png">
@ -839,6 +839,8 @@
@ -1437,6 +1439,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -4135,6 +4167,56 @@ ai_summary.py务必放到docs/overrides/hooks目录下然后
📝 本项目致力于让MkDocs文档更加智能化和用户友好。如有建议或想法欢迎交流
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/">为网站添加评论系统</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/recommend/">为MKdocs页面添加相关文章推荐</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
@ -4418,13 +4500,13 @@ ai_summary.py务必放到docs/overrides/hooks目录下然后
<!-- Link to next page -->
<a
href="../reading_time/"
href="../recommend/"
class="md-footer__link md-footer__link--next"
aria-label="下一页: 添加阅读信息统计"
aria-label="下一页: 添加相关推荐文章"
>
<div class="md-footer__title">
<span class="md-footer__direction"> 下一页 </span>
<div class="md-ellipsis">添加阅读信息统计</div>
<div class="md-ellipsis">添加相关推荐文章</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2635,6 +2667,56 @@
<hr />
<h2 id="_1"><strong>总结</strong><a class="headerlink" href="#_1" title="Permanent link">&para;</a></h2>
<p>在 MkDocs 项目中,所有资源的相对路径都应以当前 Markdown 文件为基准,确保本地和线上都能正确访问。建议统一资源管理目录结构,便于维护和引用。</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">Mkdocs 阅读时间插件</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2564,6 +2596,56 @@
<hr />
<p>检验加速效果是否生效可以使用lighthouse进行测试具体可以参考 </p>
<p><a href="../../../develop/lighthouse/">使用lighthouse进行网站性能测试</a></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/">为网站添加评论系统</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -3390,6 +3422,56 @@
<a id="__codelineno-3-141" name="__codelineno-3-141"></a>
<a id="__codelineno-3-142" name="__codelineno-3-142"></a><span class="cm">/*背景end*/</span>
</code></pre></div></td></tr></table></div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/shubiao/">JS实现鼠标样式</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">Mkdocs 阅读时间插件</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2708,6 +2740,56 @@
<span class="normal"><a href="#__codelineno-2-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1"></a><span class="nt">extra</span><span class="p">:</span>
<a id="__codelineno-2-2" name="__codelineno-2-2"></a><span class="w"> </span><span class="nt">generator</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"> </span><span class="c1">#删除页脚显示“使用 MkDocs 材料制造”</span>
</code></pre></div></td></tr></table></div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/recommend/">为MKdocs页面添加相关文章推荐</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">Mkdocs 阅读时间插件</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -834,6 +834,8 @@
@ -900,6 +902,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2515,6 +2547,56 @@
<a id="__codelineno-1-27" name="__codelineno-1-27"></a> {% endblock %}
</code></pre></div></td></tr></table></div>
<p>在main.html 里自行修改即可</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/shubiao/">JS实现鼠标样式</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocsblog/">网站添加Mkdocs博客</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -841,6 +841,8 @@
@ -907,6 +909,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2827,6 +2859,56 @@
</div>
</div>
</div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/linktech/">如何给MKdocs添加友链</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/yuanjiaohua/">网页圆角化设计</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocsblog/">网站添加Mkdocs博客</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2861,6 +2893,56 @@ twikoo.init({
</script>
我感觉twikoo也好看
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkdocsfont/">自定义Mkdocs显示字体(霞鹜文楷)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2899,6 +2931,56 @@
<a id="__codelineno-2-6" name="__codelineno-2-6"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div></p>
</div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/">为网站添加评论系统</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/linktech/">如何给MKdocs添加友链</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/time/">为MKdocs添加文章修订时间戳</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -834,6 +834,8 @@
@ -900,6 +902,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2452,6 +2484,56 @@
<a id="__codelineno-1-11" name="__codelineno-1-11"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p>希望对你有帮助</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/404/">添加404页面</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -15,7 +15,7 @@
<link rel="canonical" href="http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/reading_time/">
<link rel="prev" href="../Mkdocs-AI-Summary/">
<link rel="prev" href="../recommend/">
<link rel="next" href="../../Mkdocs/mkdocsblog/">
@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
@ -3309,6 +3341,56 @@
<a id="__codelineno-7-12" name="__codelineno-7-12"></a><span class="s2"> &quot;&quot;&quot;</span>
<a id="__codelineno-7-13" name="__codelineno-7-13"></a> <span class="k">return</span> <span class="n">reading_info</span> <span class="o">+</span> <span class="n">markdown</span>
</code></pre></div></td></tr></table></div></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/">Mkdocs部署静态网页至GitHub pages配置说明(mkdocs.yml)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/">Mkdocs教程前言</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
@ -3575,16 +3657,16 @@
<!-- Link to previous page -->
<a
href="../Mkdocs-AI-Summary/"
href="../recommend/"
class="md-footer__link md-footer__link--prev"
aria-label="上一页: MkDocs文档AI摘要"
aria-label="上一页: 添加相关推荐文章"
>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256l137.3-137.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction"> 上一页 </span>
<div class="md-ellipsis">MkDocs文档AI摘要</div>
<div class="md-ellipsis">添加相关推荐文章</div>
</div>
</a>

File diff suppressed because it is too large Load Diff

View File

@ -834,6 +834,8 @@
@ -900,6 +902,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2700,6 +2732,56 @@
<a id="__codelineno-4-5" name="__codelineno-4-5"></a> - stylesheets/extra.css
</code></pre></div></td></tr></table></div></p>
</div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/footer/">页脚设置</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2637,6 +2669,56 @@
<a id="__codelineno-4-2" name="__codelineno-4-2"></a><span class="hll"><span class="w"> </span><span class="nt">enabled</span><span class="p">:</span><span class="w"> </span><span class="kt">!ENV</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">CI</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">false</span><span class="p p-Indicator">]</span>
</span></code></pre></div></td></tr></table></div>
修改enabled的策略这样就不会每次本地渲染都检查所有文件的git历史记录渲染速度会明显加快发布网站时候会正常显示。</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/">为网站添加评论系统</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/mkdocsfont/">自定义Mkdocs显示字体(霞鹜文楷)</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/recommend/">为MKdocs页面添加相关文章推荐</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2540,6 +2572,56 @@
</code></pre></div></td></tr></table></div></p>
<h2 id="_2">放到你需要的页面即可<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h2>
<p><img alt="" src="https://help.tidio.com/hc/article_attachments/5378990613404" /></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/404/">添加404页面</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/backgroud/">背景特效</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -839,6 +839,8 @@
@ -905,6 +907,36 @@
<li class="md-nav__item">
<a href="../recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../reading_time/" class="md-nav__link">
@ -2885,6 +2917,56 @@
</code></pre></div></td></tr></table></div>
效果:<br />
<a class="md-button" href="mailto:&lt;wangkewen821@gmail.com&gt;">Send Email <span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480v-83.6c0-4 1.5-7.8 4.2-10.8l167.6-182.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8l-88.3-44.2C7.1 311.3.3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4"/></svg></span></a></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/linktech/">如何给MKdocs添加友链</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/404/">添加404页面</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/">MkDocs文档AI摘要</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -3170,6 +3202,55 @@ option = {
<!-- more -->
<p><strong></strong> 阅读更多的功能只用在文档库生成静态网站或发布到 Wordpress 博客时,插入时注意要后空一行。</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/Markdown/markdown/">Markdown语法学习 精简版</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
</ul>
</div>
<div class="footnote">
<hr />
<ol>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -3559,6 +3591,55 @@ Markdown 编写的文档可以导出 HTML 、Word、图像、PDF、Epub 等多
<p>同时推荐这个网站去学习基础markdown语法<a href="http://www.runoob.com/">runoob.com</a></p>
<p><span id="bottom"></span></p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/Markdown/MWeb/">Markdown写作应用推荐</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/">相对地址的一些问题</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/header/">添加顶部公告栏</a></li>
</ul>
</div>
<div class="footnote">
<hr />
<ol>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2591,6 +2623,52 @@
<p>作者Andreas Komninos</p>
<p>译者:孔</p>
<p>审稿Hoodie</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/designbeauty/my-to-desihn/">我对设计的一些看法</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2468,6 +2500,52 @@
<p>【⚡啊!设计,是什么呢?⚡】 </p>
<!-- <iframe src="//player.bilibili.com/player.html?aid=941663394&bvid=BV1pW4y1a7Zu&cid=824513742&p=1" scrolling="no" border="1" frameborder="no" framespacing="0" allowfullscreen="true" style="width: 640px; height: 430px; max-width: 100%"> </iframe> -->
<iframe width="560" height="315" src="//player.bilibili.com/player.html?aid=941663394&bvid=BV1pW4y1a7Zu&cid=824513742&p=1" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/designbeauty/db1/">唐·诺曼—情感设计的三个层次</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -3032,6 +3064,55 @@
<a id="__codelineno-22-2" name="__codelineno-22-2"></a>git diff [file] &gt; a.patch
<a id="__codelineno-22-3" name="__codelineno-22-3"></a>git apply a.patch
</code></pre></div></td></tr></table></div>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/lighthouse/">利用Lighthouse测试网站性能</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/">Mkdocs教程前言</a></li>
<li><a href="/Mkdocs-Wcowin/blog/websitebeauty/accelerate/">加速网站访问的一些心得</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -825,6 +825,8 @@
@ -893,6 +895,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2432,7 +2464,53 @@
<p><img alt="image.png" src="https://s2.loli.net/2024/02/04/yxwcmJLXADqMa8P.png" /></p>
<p><img width="1363" alt="image" src="https://s2.loli.net/2025/01/02/VHeITXxJgwOKSsu.jpg">
可以看到我的网站性能还是不错的,如果你想测试自己的网站性能,可以尝试一下 </p>
<p>打开谷歌或者Edge浏览器按F12在右侧点""找到Lighthouse,点击分析页面载即可 </p>
<p>打开谷歌或者Edge浏览器按F12在右侧点""找到Lighthouse,点击分析页面载即可</p>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/git/">Git 实用技巧</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -825,6 +825,8 @@
@ -893,6 +895,36 @@
<li class="md-nav__item">
<a href="../../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2428,6 +2460,55 @@
<blockquote>
<p><a href="https://cloud.tencent.com/developer/article/1771693?from=article.detail.2065884&amp;areaSource=106000.11&amp;traceId=URfJ8WWU7TMKAua9v9kI1" target="“_blank”">如何将 github pages 迁移到 vercel 上托管</a></p>
</blockquote>
<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
<div class="related-posts">
<h3>📚 相关文章推荐</h3>
<ul>
<li><a href="/Mkdocs-Wcowin/develop/git/">Git 实用技巧</a></li>
<li><a href="/Mkdocs-Wcowin/develop/lighthouse/">利用Lighthouse测试网站性能</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/">利用Mkdocs部署静态网页至GitHubpages</a></li>
<li><a href="/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/">Mkdocs教程前言</a></li>
</ul>
</div>
<!--
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>

View File

@ -824,6 +824,8 @@
@ -892,6 +894,36 @@
<li class="md-nav__item">
<a href="../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -819,6 +819,8 @@
@ -887,6 +889,36 @@
<li class="md-nav__item">
<a href="blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2460,7 +2492,7 @@ t.parentNode.insertBefore(e,t)}})();
<img class="ava" src="https://s1.imagehub.cc/images/2025/06/03/526b59b6a2e478f2ffa1629320e3e2ce.png" />
<div class="card-header">
<div>
<a href="https://wcowin.work/Mkdocs-AI-Summary/MkDocs-AI-Summary/">MkDocs AI Summary</a>
<a href="https://wcowin.work/Mkdocs-AI-Summary-Plus/MkDocs-AI-Summary/">MkDocs AI Summary</a>
</div>
<div class="info">
AI驱动的摘要生成
@ -2689,7 +2721,7 @@ t.parentNode.insertBefore(e,t)}})();
<span class="md-icon" title="最后更新">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date" title="2025年6月20日 02:05:02 UTC">2025-06-20</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date" title="2025年7月15日 15:52:09 UTC">2025-07-15</span>
</span>

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../blog/websitebeauty/reading_time/" class="md-nav__link">

View File

@ -0,0 +1,503 @@
import os
import re
from collections import Counter, defaultdict
from textwrap import dedent
import hashlib
import yaml
from urllib.parse import urlparse
# 存储所有文章的信息和索引
article_index = {}
category_index = defaultdict(list)
keyword_index = defaultdict(set)
# 配置:需要索引的目录
INDEXED_DIRECTORIES = ['blog/', 'develop/']
# 配置:排除推荐的页面列表(支持精确匹配和模式匹配)
EXCLUDED_PAGES = {
# 精确路径匹配
'blog/index.md',
'develop/index.md',
# 可以添加更多排除的页面
# 'blog/special-page.md',
}
# 配置:排除推荐的页面模式(支持通配符)
EXCLUDED_PATTERNS = [
r'.*\/index\.md$', # 排除所有 index.md 文件
r'.*\/archive\.md$', # 排除所有 archive.md 文件
r'blog\/posts?\/.*', # 排除 blog/post/ 和 blog/posts/ 目录下的所有文章
# 可以添加更多模式
# r'blog\/draft\/.*', # 排除草稿目录
]
# 配置:相似度阈值和权重
SIMILARITY_CONFIG = {
'min_threshold': 0.15, # 提高最低相似度阈值
'weights': {
'keywords': 0.35, # 关键词权重
'tags': 0.30, # 标签权重
'categories': 0.20, # 分类权重
'path': 0.10, # 路径分类权重
'source_dir': 0.05 # 源目录权重
},
'title_similarity': 0.25 # 标题相似度权重
}
def is_page_excluded(file_path):
"""检查页面是否应该排除推荐"""
# 精确匹配检查
if file_path in EXCLUDED_PAGES:
return True
# 模式匹配检查
for pattern in EXCLUDED_PATTERNS:
if re.match(pattern, file_path):
return True
return False
def should_index_file(file_path):
"""检查文件是否应该被索引"""
if not file_path.endswith('.md'):
return False
# 先检查是否被排除
if is_page_excluded(file_path):
return False
# 检查是否在指定目录下
for directory in INDEXED_DIRECTORIES:
if file_path.startswith(directory):
return True
return False
def extract_keywords(content, title):
"""提取文章中的关键词,改进算法"""
# 移除YAML front matter
content = re.sub(r'^---\s*\n.*?\n---\s*\n', '', content, flags=re.DOTALL | re.MULTILINE)
# 移除代码块
content = re.sub(r'```.*?```', '', content, flags=re.DOTALL)
# 移除HTML标签
content = re.sub(r'<.*?>', '', content)
# 移除链接
content = re.sub(r'\[.*?\]\(.*?\)', '', content)
# 移除标题标记
content = re.sub(r'^#+\s+', '', content, flags=re.MULTILINE)
# 合并标题和内容,标题权重更高
title_words = re.findall(r'\b\w+\b', title.lower()) * 4 # 增加标题权重
content_words = re.findall(r'\b\w+\b', content.lower())
all_words = title_words + content_words
# 扩展停用词列表(包含中英文)
stopwords = {
# 英文停用词
'the', 'a', 'an', 'in', 'on', 'at', 'to', 'for', 'of', 'and', 'or', 'is', 'are', 'was', 'were',
'be', 'been', 'have', 'has', 'had', 'do', 'does', 'did', 'will', 'would', 'could', 'should',
'this', 'that', 'these', 'those', 'with', 'from', 'by', 'as', 'can', 'but', 'not', 'if', 'it',
'they', 'them', 'their', 'you', 'your', 'we', 'our', 'my', 'me', 'i', 'he', 'she', 'him', 'her',
# 常见无意义词
'about', 'above', 'after', 'again', 'all', 'also', 'any', 'because', 'before', 'between',
'both', 'each', 'few', 'first', 'get', 'how', 'into', 'just', 'last', 'made', 'make', 'may',
'most', 'new', 'now', 'old', 'only', 'other', 'over', 'said', 'same', 'see', 'some', 'such',
'take', 'than', 'then', 'time', 'two', 'use', 'very', 'way', 'well', 'where', 'when', 'which',
'while', 'who', 'why', 'work', 'world', 'year', 'years',
# 中文停用词
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '可以', '没有', '什么', '一个', '自己', '这个', '那个', '这些', '那些', '如果', '因为', '所以'
}
# 过滤单词:长度>=2不在停用词中不是纯数字
words = [w for w in all_words
if len(w) >= 2 and w not in stopwords and not w.isdigit()]
# 返回词频最高的15个词
return Counter(words).most_common(15)
def extract_metadata(content):
"""提取文章元数据支持YAML front matter"""
metadata = {
'title': "未命名",
'description': "",
'tags': [],
'categories': [],
'disable_related': False # 新增:是否禁用相关推荐
}
# 尝试解析YAML front matter
yaml_match = re.match(r'^---\s*\n(.*?)\n---\s*\n', content, re.DOTALL)
if yaml_match:
try:
yaml_content = yaml_match.group(1)
yaml_data = yaml.safe_load(yaml_content)
if yaml_data:
metadata['title'] = str(yaml_data.get('title', '未命名')).strip('"\'')
metadata['description'] = str(yaml_data.get('description', '')).strip('"\'')
metadata['disable_related'] = yaml_data.get('disable_related', False)
# 处理tags
tags = yaml_data.get('tags', [])
if isinstance(tags, list):
metadata['tags'] = [str(tag).strip() for tag in tags]
elif isinstance(tags, str):
metadata['tags'] = [tag.strip() for tag in tags.split(',') if tag.strip()]
# 处理categories
categories = yaml_data.get('categories', [])
if isinstance(categories, list):
metadata['categories'] = [str(cat).strip() for cat in categories]
elif isinstance(categories, str):
metadata['categories'] = [cat.strip() for cat in categories.split(',') if cat.strip()]
except yaml.YAMLError:
pass # 如果YAML解析失败使用默认值
# 如果YAML解析失败回退到正则表达式
if metadata['title'] == "未命名":
title_match = re.search(r'^title:\s*(.+)$', content, re.MULTILINE)
if title_match:
metadata['title'] = title_match.group(1).strip('"\'')
return metadata
def get_category_from_path(file_path):
"""从文件路径提取分类"""
parts = file_path.split('/')
if len(parts) > 2:
return parts[1] # blog/category/file.md 或 develop/category/file.md格式
elif len(parts) > 1:
return parts[0] # blog 或 develop
return "未分类"
def calculate_content_hash(content):
"""计算内容哈希,用于检测内容变化"""
return hashlib.md5(content.encode('utf-8')).hexdigest()
def on_files(files, config):
"""预处理所有文章,建立索引"""
global article_index, category_index, keyword_index
# 清空索引
article_index.clear()
category_index.clear()
keyword_index.clear()
processed_count = 0
excluded_count = 0
for file in files:
if should_index_file(file.src_path):
try:
with open(file.abs_src_path, 'r', encoding='utf-8') as f:
content = f.read()
# 提取元数据
metadata = extract_metadata(content)
# 检查是否禁用相关推荐
if metadata.get('disable_related', False):
excluded_count += 1
continue
# 再次检查是否在排除列表中(双重检查)
if is_page_excluded(file.src_path):
excluded_count += 1
continue
# 提取关键词
keywords = extract_keywords(content, metadata['title'])
# 获取分类
path_category = get_category_from_path(file.src_path)
# 构建文章信息
article_info = {
'title': metadata['title'],
'description': metadata['description'],
'tags': metadata['tags'],
'categories': metadata['categories'],
'path_category': path_category,
'keywords': keywords,
'url': file.url,
'path': file.src_path,
'content_hash': calculate_content_hash(content),
'source_dir': file.src_path.split('/')[0] # blog 或 develop
}
# 添加到主索引
article_index[file.src_path] = article_info
# 添加到分类索引
category_index[path_category].append(file.src_path)
for category in metadata['categories']:
if category: # 确保分类不为空
category_index[category].append(file.src_path)
# 添加到关键词索引
for keyword, _ in keywords:
keyword_index[keyword].add(file.src_path)
for tag in metadata['tags']:
if tag: # 确保标签不为空
keyword_index[tag.lower()].add(file.src_path)
processed_count += 1
except Exception as e:
print(f"❌ 处理文件 {file.src_path} 时出错: {e}")
print(f"✅ 已索引 {processed_count} 篇文章 (blog + develop)")
if excluded_count > 0:
print(f"📝 排除 {excluded_count} 篇禁用推荐或在排除列表中的文章")
print(f"📊 分类数量: {len(category_index)}")
print(f"🔤 关键词数量: {len(keyword_index)}")
return files
def on_page_markdown(markdown, **kwargs):
"""为每篇文章添加相关推荐"""
page = kwargs['page']
config = kwargs['config']
# 检查是否应该处理这个页面
if not should_index_file(page.file.src_path):
return markdown
# 检查是否被排除
if is_page_excluded(page.file.src_path):
return markdown
# 检查文章元数据是否禁用推荐
try:
with open(page.file.abs_src_path, 'r', encoding='utf-8') as f:
content = f.read()
metadata = extract_metadata(content)
if metadata.get('disable_related', False):
return markdown
except Exception:
pass # 如果读取失败,继续处理
# 获取相关文章
related_articles = get_related_articles(page.file.src_path, max_count=5)
if not related_articles:
return markdown
# 从 config 中获取 site_url 并解析出基本路径
site_url = config.get('site_url', '')
base_path = urlparse(site_url).path if site_url else '/'
if not base_path.endswith('/'):
base_path += '/'
# 构建推荐HTML - 针对Safari浏览器优化
recommendation_html = "\n"
# 添加CSS样式特别针对Safari浏览器优化
recommendation_html += """<style>
.related-posts {
margin-top: 1.5rem;
padding-top: 0.75rem;
border-top: 1px solid rgba(0,0,0,0.1);
max-height: none !important; /* 防止Safari错误计算高度 */
overflow: visible !important; /* 防止内容被截断 */
}
.related-posts h3 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.3;
}
.related-posts ul {
margin: 0 0 0.5rem 0 !important; /* 强制覆盖可能的冲突样式 */
padding-left: 1.5rem;
list-style-position: outside;
}
.related-posts li {
margin-bottom: 0.25rem;
line-height: 1.4;
}
/* 暗色模式适配 */
[data-md-color-scheme="slate"] .related-posts {
border-top-color: rgba(255,255,255,0.1);
}
/* Safari特定修复 */
@supports (-webkit-hyphens:none) {
.related-posts {
display: block;
position: relative;
height: auto !important;
}
.related-posts ul {
position: static;
}
}
</style>
"""
# 简化且兼容的HTML结构
recommendation_html += '<div class="related-posts">\n'
recommendation_html += '<h3>📚 相关文章推荐</h3>\n'
recommendation_html += '<ul>\n'
for score, article_info in related_articles:
title = article_info['title']
relative_url = article_info['url']
# 拼接基本路径和文章相对URL并确保路径分隔符正确
full_url = (base_path + relative_url).replace('//', '/')
recommendation_html += f'<li><a href="{full_url}">{title}</a></li>\n'
recommendation_html += '</ul>\n'
recommendation_html += '</div>\n'
# 确保没有多余的空行
return markdown.rstrip() + recommendation_html
def get_related_articles(current_path, max_count=5):
"""获取相关文章,使用改进的算法"""
if current_path not in article_index:
return []
current_article = article_index[current_path]
similarities = []
# 获取当前文章的关键信息
current_title = current_article['title'].lower()
current_tags = set(tag.lower() for tag in current_article['tags'] if tag)
current_categories = set(cat.lower() for cat in current_article['categories'] if cat)
for path, article_info in article_index.items():
if path == current_path:
continue
# 过滤掉标题为"未命名"的文章
if article_info['title'] == "未命名" or not article_info['title'].strip():
continue
# 再次检查是否在排除列表中(双重检查)
if is_page_excluded(path):
continue
# 计算相似度
score = calculate_similarity(current_article, article_info)
# 标题相似度加权
title_similarity = calculate_title_similarity(current_title, article_info['title'].lower())
if title_similarity > 0.3: # 标题有一定相似度
score += title_similarity * SIMILARITY_CONFIG['title_similarity']
# 应用最低阈值
if score > SIMILARITY_CONFIG['min_threshold']:
similarities.append((score, article_info))
# 按相似度排序
similarities.sort(key=lambda x: x[0], reverse=True)
# 多样性优化:确保不同分类的文章都有机会被推荐
if len(similarities) > max_count * 2:
# 按分类分组
category_groups = defaultdict(list)
for score, article in similarities:
for category in article['categories']:
if category:
category_groups[category.lower()].append((score, article))
# 从每个分类中选取最相关的文章
diverse_results = []
used_paths = set()
# 首先添加最相关的文章
if similarities:
top_score, top_article = similarities[0]
diverse_results.append((top_score, top_article))
used_paths.add(top_article['path'])
# 然后从每个分类中添加最相关的文章
for category in sorted(category_groups.keys()):
if len(diverse_results) >= max_count:
break
for score, article in category_groups[category]:
if article['path'] not in used_paths:
diverse_results.append((score, article))
used_paths.add(article['path'])
break
# 如果还有空位,从剩余的高分文章中填充
if len(diverse_results) < max_count:
for score, article in similarities:
if article['path'] not in used_paths and len(diverse_results) < max_count:
diverse_results.append((score, article))
used_paths.add(article['path'])
# 重新按相似度排序
diverse_results.sort(key=lambda x: x[0], reverse=True)
return diverse_results[:max_count]
return similarities[:max_count]
def calculate_title_similarity(title1, title2):
"""计算两个标题的相似度"""
# 分词
words1 = set(re.findall(r'\b\w+\b', title1))
words2 = set(re.findall(r'\b\w+\b', title2))
if not words1 or not words2:
return 0
# 计算Jaccard相似度
intersection = len(words1.intersection(words2))
union = len(words1.union(words2))
if union == 0:
return 0
return intersection / union
def calculate_similarity(article1, article2):
"""计算两篇文章的相似度"""
score = 0
weights = SIMILARITY_CONFIG['weights']
# 1. 关键词相似度
keywords1 = dict(article1['keywords'])
keywords2 = dict(article2['keywords'])
common_keywords = set(keywords1.keys()) & set(keywords2.keys())
if common_keywords:
# 考虑关键词的频率和重要性
keyword_score = sum(min(keywords1[kw], keywords2[kw]) for kw in common_keywords)
# 关键词匹配数量的奖励
keyword_count_bonus = len(common_keywords) / max(len(keywords1), 1) * 0.5
score += (keyword_score + keyword_count_bonus) * weights['keywords']
# 2. 标签相似度
tags1 = set(tag.lower() for tag in article1['tags'] if tag)
tags2 = set(tag.lower() for tag in article2['tags'] if tag)
if tags1 and tags2: # 确保两篇文章都有标签
tag_overlap = len(tags1 & tags2)
tag_ratio = tag_overlap / max(len(tags1), 1) # 相对重叠比例
tag_score = tag_overlap * 8 * (1 + tag_ratio) # 增加重叠比例奖励
score += tag_score * weights['tags']
# 3. 分类相似度
categories1 = set(cat.lower() for cat in article1['categories'] if cat)
categories2 = set(cat.lower() for cat in article2['categories'] if cat)
if categories1 and categories2: # 确保两篇文章都有分类
category_overlap = len(categories1 & categories2)
category_ratio = category_overlap / max(len(categories1), 1)
category_score = category_overlap * 12 * (1 + category_ratio)
score += category_score * weights['categories']
# 4. 路径分类相似度
if article1['path_category'] == article2['path_category']:
score += 3 * weights['path']
# 5. 同源目录加分
if article1.get('source_dir') == article2.get('source_dir'):
score += 2 * weights['source_dir']
return score

File diff suppressed because one or more lines are too long

View File

@ -2,214 +2,218 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/link/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/liuyanban/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/tag/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/ZH-TW/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/about/geren/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/about/resume/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/about/test/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/about/zcw/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/MIT/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/linktech/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/mkdocs1/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/mkdocs2/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/mkdocs3/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/mkdocsblog/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/Mkdocs/mkfirst/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/2021/12/18/%E5%8D%9A%E5%AE%A2%E6%96%87%E7%AB%A0%E6%B5%8B%E8%AF%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/2022/06/06/2022%E7%BD%91%E7%AB%99%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/2023/12/21/2023%E7%BD%91%E7%AB%99%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/2024/01/01/2024%E7%BD%91%E7%AB%99%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/2025/01/01/2025%E7%BD%91%E7%AB%99%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/404/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/Mkdocs-AI-Summary/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/Relativeaddress/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/accelerate/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/backgroud/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/footer/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/header/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/linktech/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/mkcomments/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/mkdocsfont/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/mkpdf/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/reading_time/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/recommend/</loc>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/shubiao/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/time/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/webtalknow/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/websitebeauty/yuanjiaohua/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/git/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/lighthouse/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/vercel/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/Markdown/MWeb/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/Markdown/markdown/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/designbeauty/db1/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/develop/designbeauty/my-to-desihn/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/en/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/archive/2025/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/archive/2024/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/archive/2023/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/archive/2022/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/archive/2021/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/category/%E7%BD%91%E7%AB%99%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
<url>
<loc>http://wcowin.work/Mkdocs-Wcowin/blog/category/hello-world/</loc>
<lastmod>2025-07-12</lastmod>
<lastmod>2025-07-15</lastmod>
</url>
</urlset>

Binary file not shown.

View File

@ -15,7 +15,7 @@ button.md-top {
font-family: LXGW WenKai; /* 修改字体 */
font-size: 16px; /* 修改字体大小 */
font-weight: lighter;/* 修改字体粗细 */
color: #1D2636; /* 修改字体颜色 */
/* color: #1D2636; 修改字体颜色 */
}
:root {
@ -604,3 +604,27 @@ filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
height: 30rem;
}
/* 仅针对文本链接设置红色 */
.md-typeset p a:not(.md-button):not([class*="md-"]):not([style*="background"]),
.md-typeset li a:not(.md-button):not([class*="md-"]):not([style*="background"]),
.md-typeset td a:not(.md-button):not([class*="md-"]):not([style*="background"]),
.md-typeset blockquote a:not(.md-button):not([class*="md-"]):not([style*="background"]) {
color: #5688F7 !important; /* 红色文本链接 */
text-decoration: none;
}
.md-typeset p a:not(.md-button):not([class*="md-"]):not([style*="background"]):hover,
.md-typeset li a:not(.md-button):not([class*="md-"]):not([style*="background"]):hover,
.md-typeset td a:not(.md-button):not([class*="md-"]):not([style*="background"]):hover,
.md-typeset blockquote a:not(.md-button):not([class*="md-"]):not([style*="background"]):hover {
color: #43d2e8 !important; /* 悬停时深红色 */
text-decoration: underline;
}
/* 访问过的文本链接 */
/* .md-typeset p a:not(.md-button):not([class*="md-"]):not([style*="background"]):visited,
.md-typeset li a:not(.md-button):not([class*="md-"]):not([style*="background"]):visited,
.md-typeset td a:not(.md-button):not([class*="md-"]):not([style*="background"]):visited,
.md-typeset blockquote a:not(.md-button):not([class*="md-"]):not([style*="background"]):visited {
color: #b83280 !important;
} */

View File

@ -41,3 +41,8 @@
border-radius: 4px;
cursor: pointer;
}
/* 目录导航的缩进参考线 */
nav.md-nav--secondary ul {
border-left: 1px solid lightblue;
}

View File

@ -830,6 +830,8 @@
@ -898,6 +900,36 @@
<li class="md-nav__item">
<a href="../blog/websitebeauty/recommend/" class="md-nav__link">
<span class="md-ellipsis">
添加相关推荐文章
</span>
<span class="md-status md-status--new"></span>
</a>
</li>
<li class="md-nav__item">
<a href="../blog/websitebeauty/reading_time/" class="md-nav__link">
@ -2657,6 +2689,12 @@
</a>
</li>
<li>
<a href="../blog/websitebeauty/recommend/">
添加相关推荐文章
</a>
</li>
<li>
<a href="../blog/websitebeauty/mkcomments/">
添加评论系统(giscus为例)