Skip to content

Commit

Permalink
add 教程
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Oct 13, 2023
1 parent b3b3ed0 commit 5f0db27
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 4 deletions.
71 changes: 71 additions & 0 deletions .github/asserts/_posts/Anatolo设置教程.md
Original file line number Diff line number Diff line change
@@ -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

<div class="tip">
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.
</div>

进入你的 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
```

107 changes: 107 additions & 0 deletions .github/asserts/anatolo_config.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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: [email protected]
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
8 changes: 4 additions & 4 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

0 comments on commit 5f0db27

Please sign in to comment.