Skip to content

Commit

Permalink
Merge pull request #377 from fi3ework/dev
Browse files Browse the repository at this point in the history
Refactor `toc.js` and upgrade deps (v1.6.6)
  • Loading branch information
LolipopJ committed Jul 5, 2023
2 parents 0a012d5 + 1a03120 commit c2dc387
Show file tree
Hide file tree
Showing 26 changed files with 13,994 additions and 1,648 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
name: "「请求帮助」或「反馈 Bug」(Help wanted or bug report)"
about: 遇到问题需要帮助,或者是发现了 bug 提出反馈,尽量将以下信息填写完整即可(Encounter a problem and need help or
name: '「请求帮助」或「反馈 Bug」(Help wanted or bug report)'
about:
遇到问题需要帮助,或者是发现了 bug 提出反馈,尽量将以下信息填写完整即可(Encounter a problem and need help or
report bug. Fill the following as much as you can, please)

---

**「描述遇到的问题」或「发现的 bug」(Describe the problem or bug you encounter)**

**你是否已经阅读过以下内容,并确认你的行为是正确的,在 `[ ]` 中填入 `x` 选中(Ensure that you had consulted followings and confirm the validity of your operation, fill `x` in `[ ]` to select)**

- [ ] [Hexo 文档 | Hexo document](https://hexo.io/docs/)
- [ ] [Archer 文档 | hexo-theme-archer document](https://github.com/fi3ework/hexo-theme-archer)

Expand All @@ -20,8 +21,9 @@ about: 遇到问题需要帮助,或者是发现了 bug 提出反馈,尽量
**打开控制台,填写控制台中打印的主题的版本,如果脚本出错可直接提供控制台截图(Open the console and report the version of hexo-theme-archer. You can paste the screenshot on console directly if there is error with script)**

**信息 (please complete the following information):**
- 操作系统(OS): [e.g. iOS]
- 浏览器(Browser) [e.g. chrome, safari]
- 浏览器版本(Version)[e.g. 22][可选]

- 操作系统(OS): [e.g. iOS]
- 浏览器(Browser) [e.g. chrome, safari]
- 浏览器版本(Version)[e.g. 22][可选]

**其他信息(Additional context)**
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/-----feature-request-.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 提出建议(Feature request)
about: 提出你对主题的建议(Suggest an idea for this project)

---

**提出你对主题的建议(Suggest your idea)**
Expand Down
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/-----other-issue-.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
name: 其他问题(Other issue)
about: 请确认你提出的 issue 不属于「请求帮助」「反馈 bug」或者「提出建议」,否则将有几率被直接关闭。(Make sure your issue is
about:
请确认你提出的 issue 不属于「请求帮助」「反馈 bug」或者「提出建议」,否则将有几率被直接关闭。(Make sure your issue is
not about help wanted, bug report or feature report, or it may be closed directly)

---


2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ tags
# Persistent undo
[._]*.un~


# End of https://www.gitignore.io/api/vim

*.iml
*.ipr
*.iws
Expand Down
8 changes: 4 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
.DS_Store
source
node_modules/
.DS_Store/
source/
_config.yml
*.md
README.md
34 changes: 17 additions & 17 deletions docs/README-en.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
hexo-theme-archer
================
# hexo-theme-archer

![preview](./snap.png)

## Online demo

🎯 Preview theme:[Demo](http://firework.studio/archer-demo/)
🎯 Preview theme:[Demo](http://firework.studio/archer-demo/)

## Document

Expand All @@ -16,20 +15,20 @@ hexo-theme-archer

- This theme is inspired by theme [yilia](https://github.com/litten/hexo-theme-yilia) and theme [huxpro](https://github.com/Huxpro/huxpro.github.io), it combines the sidebar of the former and the UI design of latter. You can switch to archive, tag and categories via the navigation sidebar without jumpping to a new page.
- Compatibility:modern browsers and IE 10 +.
- You are welcomed to create a new [issue]((https://github.com/fi3ework/hexo-theme-archer/issues)。) if there is any problem when installling and using this theme.
- You are welcomed to create a new [issue](<(https://github.com/fi3ework/hexo-theme-archer/issues)。>) if there is any problem when installling and using this theme.
- This theme will continue to be maintained and optimized, star it if you like it 😆.

## Install
## Install

1. Execute the following commands in **Hexo directory**.

``` shell
```shell
npm i hexo-generator-json-content --save && npm i --save hexo-wordcount && git clone https://github.com/fi3ework/hexo-theme-archer.git themes/archer
```

2. Change the `theme` property to `archer` of `_config.yml` in **Hexo directory**.

``` yaml
```yaml
theme: archer
```

Expand Down Expand Up @@ -118,7 +117,7 @@ about:
enable: true
# about heade image
image:

# ========== Site ========== #
# title of the site (each article will be followed by this value to help SEO)
SEO_title:
Expand All @@ -142,9 +141,9 @@ algolia_search:
per_page: 10 # result number per page
labels:
input_placeholder: Search for Posts # search input placeholder
hits_empty: "We did not find any results for the search: ${query}" # search results hint
hits_stats: "${hits} results found in ${time} ms" # no results found hint
hits_empty: 'We did not find any results for the search: ${query}' # search results hint
hits_stats: '${hits} results found in ${time} ms' # no results found hint

# ========== Comment Plugin ========== #
# Currently support directly adding Livere, Gitment, Youyan and Valine, fill the field to enable corresponding plugin
comment:
Expand All @@ -160,10 +159,10 @@ comment:
# Youyan: http://www.uyan.cc/
youyan_uid:
# Valine: site: https://valine.js.org/
valine_appId:
valine_appKey:
valine_placeHolder:
valine_appId:
valine_appKey:
valine_placeHolder:

# ========== Analytics ========== #
# enable Busuanzi analytics
busuanzi: true
Expand Down Expand Up @@ -192,17 +191,18 @@ index_intro_height: 50
post_intro_height: 50
about_intro_height: 50
```

## Update theme

Two kind of update method are provided here: the first use git to update theme. However, it may encounter merge conflict that you need to resolve; The second is simple but efficient.
Two kind of update method are provided here: the first use git to update theme. However, it may encounter merge conflict that you need to resolve; The second is simple but efficient.

### git pull

Run `git stash` under archer folder to stash the local modification and run `git pull` to fetch the lastest version of theme. Then run `git stash pop` to restore the local modification. There may be a merge conflict that you need to resolve.

### simple but efficient way

First backup all the files that you customed and added (include _config.yml and files in source and so on) and delete the directory of archer. Then reinstall archer. At last, restore the backup files to the original place they belong.
First backup all the files that you customed and added (include \_config.yml and files in source and so on) and delete the directory of archer. Then reinstall archer. At last, restore the backup files to the original place they belong.

## License

Expand Down
20 changes: 13 additions & 7 deletions docs/develop-guide-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ Please read this document before secondary development of archer.
## Directory Structure

- `docs` : document directory
- `layout` : html template directory, it will be load by Hexo
- `layout` : html template directory, it will be load by Hexo
- `source` : distribution files, include css, scripts and static files
- `src` : source directory, will compiled to source directory
- `js` : js source code
- `scss` : scss source code

Edit *.ejs file in `layout` if you want to change Html structure. Edit *.scss in `src/scss` if you want to change style. Edit js files in `src/js` if you want to change script. The modification to scss and js will be compiled before generated to `source`. Please read the following development steps.
Edit \_.ejs file in `layout` if you want to change Html structure. Edit \_.scss in `src/scss` if you want to change style. Edit js files in `src/js` if you want to change script. The modification to scss and js will be compiled before generated to `source`. Please read the following development steps.

**NOTE:** If `hexo s` and `hexo g` takes a long time, please add following field to **_config in Hexo directory** to ignore modules and .git file.
**NOTE:** If `hexo s` and `hexo g` takes a long time, please add following field to **\_config in Hexo directory** to ignore modules and .git file.

```yaml
ignore: ['**/themes/**/node_modules/**', '**/themes/**/node_modules', '**/themes/**/.git', '**/themes/**/.git/**']
ignore:
[
'**/themes/**/node_modules/**',
'**/themes/**/node_modules',
'**/themes/**/.git',
'**/themes/**/.git/**',
]
```

## Development Steps
Expand All @@ -25,17 +31,17 @@ ignore: ['**/themes/**/node_modules/**', '**/themes/**/node_modules', '**/themes

The following steps are **local development** and **distribution**. When in **local development**, the modified files will be compiled and the browser will be reloaded automatically. Run **distribution** after local development to distribute files to source (It's ok to skip local development. You can edit the source code and run distribution directly).

**NOTE:** Please delete `public` in Hexo directory to avoid disturb.
**NOTE:** Please delete `public` in Hexo directory to avoid disturb.

### Local development

1. run `hexo s` in Hexo directory to start server.
2. run `npm run dev` to start watching

In this mode, files in `src` and `layout` will be watched and compiled, the browser will be reloaded automatically via BrowserSync at `localhost:3000` (modification to other files will not trigger reload, you need to reload it manually).
In this mode, files in `src` and `layout` will be watched and compiled, the browser will be reloaded automatically via BrowserSync at `localhost:3000` (modification to other files will not trigger reload, you need to reload it manually).

### Distribution

1. run `npm run build` in archer directory and the files will be compiled to `source`

You can generate you blog after distribution.
You can generate you blog after distribution.
8 changes: 7 additions & 1 deletion docs/develop-guide-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
在 Hexo 根目录下的配置文件 `_config.yml` 中加入以下字段忽略 `node_modules``.git` 目录。

```yaml
ignore: ['**/themes/**/node_modules/**', '**/themes/**/node_modules', '**/themes/**/.git', '**/themes/**/.git/**']
ignore:
[
'**/themes/**/node_modules/**',
'**/themes/**/node_modules',
'**/themes/**/.git',
'**/themes/**/.git/**',
]
```

### 安装依赖
Expand Down
Loading

0 comments on commit c2dc387

Please sign in to comment.