diff --git a/docs/blog/Mkdocs/mkdocs1.md b/docs/blog/Mkdocs/mkdocs1.md index 5877ee1..41c5cf6 100644 --- a/docs/blog/Mkdocs/mkdocs1.md +++ b/docs/blog/Mkdocs/mkdocs1.md @@ -4,6 +4,8 @@ tags: - Mkdocs --- +> 下面全部内容把】改成},把【改成{ + !!! info 官方网站:[MkDocs](https://www.mkdocs.org/){target=“_blank”} @@ -118,7 +120,7 @@ jobs: - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v3 with: - key: mkdocs-material-${{ env.cache_id }} + key: mkdocs-material-$【【 env.cache_id 】】 # 此处把【【】】改成`{``{``}``}`(只有英文大括号) path: .cache restore-keys: | mkdocs-material- diff --git a/docs/blog/websitebeauty/header.md b/docs/blog/websitebeauty/header.md index 9e4298c..5eb2eeb 100644 --- a/docs/blog/websitebeauty/header.md +++ b/docs/blog/websitebeauty/header.md @@ -10,6 +10,9 @@ tags: - Mkdocs comments: false #评论,默认不开启 --- + +> 下面全部内容把】改成},把【改成{ +  docs/overrides下新建main.html ,针对main.html文件 @@ -33,33 +36,33 @@ $ tree -a ``` ```html -{#- +【#- This file was automatically generated - do not edit - -#} - {% extends "base.html" %} - {% block extrahead %} - - {% endblock %} - {% block announce %} + -#】 + 【% extends "base.html" %】 + 【% block extrahead %】 + + 【% endblock %】 + 【% block announce %】 Follow @Wcowin on - {% include ".icons/fontawesome/brands/bilibili.svg" %} + 【% include ".icons/fontawesome/brands/bilibili.svg" %】 Bilibili and - {% include ".icons/fontawesome/brands/twitter.svg" %} + 【% include ".icons/fontawesome/brands/twitter.svg" %】 Twitter - {% endblock %} - {% block scripts %} - {{ super() }} - - {% endblock %} + 【% endblock %】 + 【% block scripts %】 + 【【 super() 】】 + + 【% endblock %】 ``` diff --git a/docs/blog/websitebeauty/mkcomments.md b/docs/blog/websitebeauty/mkcomments.md index a6a4e81..8f91171 100644 --- a/docs/blog/websitebeauty/mkcomments.md +++ b/docs/blog/websitebeauty/mkcomments.md @@ -4,33 +4,39 @@ comments: true tags: - Mkdocs --- -官方文档:[Adding a comment system](https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/) + +> 下面全部内容把】改成},把【改成{ + +官方文档:[Adding a comment system](https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/) 这里我同样推荐[giscus](https://giscus.app/zh-CN) - 利用 GitHub Discussions 实现的评论系统,让访客借助 GitHub 在你的网站上留下评论和反应吧!本项目深受 utterances 的启发。 -* 开源。🌏 -* 无跟踪,无广告,永久免费。📡 🚫 -* 无需数据库。所有数据均储存在 GitHub Discussions 中。:octocat: -* 支持自定义主题!🌗 -* 支持多种语言。🌐 -* 高可配置性。🔧 -* 自动从 GitHub 拉取新评论与编辑。🔃 -* 可自建服务!🤳 +- 开源。🌏 +- 无跟踪,无广告,永久免费。📡 🚫 +- 无需数据库。所有数据均储存在 GitHub Discussions 中。:octocat: +- 支持自定义主题!🌗 +- 支持多种语言。🌐 +- 高可配置性。🔧 +- 自动从 GitHub 拉取新评论与编辑。🔃 +- 可自建服务!🤳 言归正传 ## 第一步 -mkdocs.yml中添加 + +mkdocs.yml 中添加 + ``` theme: name: material custom_dir: docs/overrides #主要是这一行 ``` -参考下图新建overrides文件,在此文件下参考下图新建覆盖html文件 -树状结构如下: + +参考下图新建 overrides 文件,在此文件下参考下图新建覆盖 html 文件 +树状结构如下: + ``` $ tree -a . @@ -47,17 +53,18 @@ $ tree -a │ └──comments.html │ └── mkdocs.yml -``` +```  -在comments.html中 +在 comments.html 中 ```html hl_lines="4-18" -{% if page.meta.comments %} -