From 5f0db27d9471b719285cc0688bb1d6896f7e201d Mon Sep 17 00:00:00 2001 From: Lhcfl Date: Fri, 13 Oct 2023 15:31:51 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=95=99=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...76\347\275\256\346\225\231\347\250\213.md" | 71 ++++++++++++ .github/asserts/anatolo_config.yml | 107 ++++++++++++++++++ .github/workflows/test_and_build.yml | 8 +- 3 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 ".github/asserts/_posts/Anatolo\350\256\276\347\275\256\346\225\231\347\250\213.md" create mode 100644 .github/asserts/anatolo_config.yml diff --git "a/.github/asserts/_posts/Anatolo\350\256\276\347\275\256\346\225\231\347\250\213.md" "b/.github/asserts/_posts/Anatolo\350\256\276\347\275\256\346\225\231\347\250\213.md" new file mode 100644 index 0000000..a06f1b3 --- /dev/null +++ "b/.github/asserts/_posts/Anatolo\350\256\276\347\275\256\346\225\231\347\250\213.md" @@ -0,0 +1,71 @@ +--- +title: Anatolo设置教程 +date: 2023-10-13 15:05:47 +tags: + - Anatolo设置教程 +toc: true +--- + +欢迎使用Anatolo。本教程将教您Anatolo的所有可配置项目。 + +Welcome to user Anatolo. This tutorial will teach you all of Anatolo's configurable items. + +## 安装,配置与更新 | Install, configure and update + +### 下载主题文件 | Download theme asserts + +#### 通过 GitHub | By Github + +进入你的 Hexo Blog 根目录: + +Enter your root path of Hexo blog: + +``` +git clone https://gitee.com/Lhcfl/hexo-theme-anatolo.git themes/Anatolo +``` + +#### 通过 Gitee 镜像 | By Gitee mirror + +
+Due to the special network environment in mainland China, GitHub is often unavailable. The mirror and local download methods are prepared for people living in mainland China. For others, this part can be ignored safely. +
+ +进入你的 Hexo Blog 根目录: + +``` +git clone https://gitee.com/Lhcfl/hexo-theme-anatolo themes/Anatolo +``` + +#### 通过本地安装 | Local methods + +本地安装不支持通过Github更新。 +直接下载该主题的zip包解压至主题目录下,重命名为 `Anatolo` + +Local installations do not support upgrade via Github. +Just directly download the zip package of the theme, unzip it to the theme directory, and rename it to `Anatolo`. + +### 安装依赖 | Install dependencies + +``` +npm install hexo-renderer-pug --save +npm install hexo-renderer-stylus --save +``` + +### 配置 | Configure + +复制 `themes/Anatolo` 下的 `_config.example.yml` ,粘贴为 `_config.yml` +修改hexo根目录下的 `_config.yml` : `theme: Anatolo` + +Copy `_config.example.yml` in `themes/Anatolo` to `_config.yml` +Modify `_config.yml` in the hexo root directory: `theme: Anatolo` + +### 更新 | Upgrade + +在Anatolo的目录下 + +In the Anatolo root directory: + +``` +git pull origin master +``` + diff --git a/.github/asserts/anatolo_config.yml b/.github/asserts/anatolo_config.yml new file mode 100644 index 0000000..1644a3c --- /dev/null +++ b/.github/asserts/anatolo_config.yml @@ -0,0 +1,107 @@ +# Blog config +keywords: Blog,博客,Hexo +author: Lhc_fl +description: A simple and beautiful blog +defaultTheme: light-mode # light-mode or dark-mode + +# icon +# If the is size is incorrect, please edit /source.css/style.styl +favicon: /images/favicon.webp +avatar: /images/logo.webp +logo_dir: /images/logo@2x.webp +logo_style: width:220px; + +copyright: + show: false + default: "本文采用CC-BY-SA-3.0协议,转载请注明出处" + show_author: true + +# 你可以在文章中对文章进行单独设置copyright +# 例如: +# --- +# title: xxx +# copyright: "本文著作权归作者所有" +# author: "Li Hua and Han Meimei" +# --- +# --- +# title: xxx +# copyright: disabled +# --- + + +footbar: + # Copyright + copyright: + # 对于中国用户,如果你有网站备案: + beian: + gongan: + + +# Social Links +# If you want to add more, go to sidebar.pug +github: https://github.com/Lhcfl +mail: lhcfl@outlook.com +zhihu: +QQ: +twitter: +instagram: +rss: +facebook: +weibo: + +# Nav menu +menu: + Home: / + Archives: /archives + Tags: /tags + About: /about + # Links: /links + +# Navbar rightbtn +rightbtn: + back: true + search: true # 从Icarus抠出来的搜索框,关掉可以稍微提高速度 + avatar: true + darkLightToggle: true # 切换明亮暗黑主题(还没做好,建议别用) + + +# Some settings +useSummary: false # enable it will use summary of your posts in index + +useTagCloud: false # use tagcloud instead of tag list +tocMaxDepth: 6 # if you set 0, toc will close. The maximum is 6. + + + +# Comment +always_enable_comments: false # Always enable comments + +duoshuo: +disqus: +gentie: +# Valine comments https://valine.js.org +valine: + enable: false # if you want use valine, please set enable: true + appid: # your leancloud appid + appkey: # your leancloud appkey + notify: false # true/false:mail notify !!!Test,Caution. https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE + verify: false # true/false:verify code + avatar: mm # avatar style https://github.com/xCss/Valine/wiki/avatar-setting-for-valine + placeholder: hello, world # comment box placeholder +gitment: + enable: false + owner: '你的 GitHub ID' + repo: '存储评论的 repo' + client_id: '你的 client ID' + client_secret: '你的 client secret' +gitalk: + enable: false + owner: '你的 GitHub ID' + repo: '存储评论的 repo' + client_id: '你的 client ID' + client_secret: '你的 client secret' +# 百度统计设置 +# 请访问 https://tongji.baidu.com/ +# 获取统计JS代码放入 Anatolo/source/js/baidu-tongji.js + +Baidutongji: false diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 38667b5..99ed7c6 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -32,16 +32,16 @@ jobs: - name: Configure Hexo Unit Test # 配置 Hexo 单元测试 run: | git clone https://github.com/hexojs/hexo-theme-unit-test.git unit_test + git clone https://github.com/Lhcfl/hexo-theme-anatolo.git unit_test/themes/Anatolo + cp ./.github/asserts/anatolo_config.yml unit_test/unit_test/themes/Anatolo/_config.yml cp ./.github/asserts/hexo_config.yml unit_test/_config.yml + cp ./.github/asserts/_posts/* unit_test/source/_posts/ cd unit_test npm install npm install hexo-renderer-pug --save npm install hexo-renderer-stylus --save npx hexo new "Anatolo简介" cat ../README.md >> ./source/_posts/Anatolo简介.md - git clone https://github.com/Lhcfl/hexo-theme-anatolo.git themes/Anatolo - cd themes/Anatolo - cp _config.example.yml _config.yml - name: Generate Test # 生成 Hexo 单元测试 run: | @@ -56,5 +56,5 @@ jobs: git init git remote add origin $GIT_URL git add -A - git commit -m "Test auto generated." + git commit -m "Auto generated." git push origin HEAD:master --force \ No newline at end of file