2019-12-25 12:49:21 +00:00
< p align = "center" > < a href = "https://shen-yu.gitee.io" target = "_blank" rel = "noopener noreferrer" > < img width = "100" src = "logo.png" alt = "ayer logo" > < / a > < / p >
2020-01-15 00:25:50 +00:00
< h3 align = "center" > 一个安静且优雅的 Hexo 主题< / h3 >
2019-12-25 13:01:24 +00:00
2019-12-25 15:27:30 +00:00
< p align = "center" >
< a href = "https://travis-ci.org/Shen-Yu/hexo-theme-ayer?branch=master" target = "_blank" rel = "noopener noreferrer" >
< img alt = "travis-ci" src = "https://travis-ci.org/Shen-Yu/hexo-theme-ayer.svg?branch=master" >
< / a >
< a href = "http://standardjs.com" target = "_blank" rel = "noopener noreferrer" >
< img alt = "js-standard-style" src = "https://img.shields.io/badge/code%20style-standard-brightgreen.svg" >
< / a >
2020-09-30 03:01:24 +00:00
< br >
< a href = "https://www.npmjs.com/package/hexo-theme-ayer" target = "_blank" rel = "noopener noreferrer" >
< img alt = "npm" src = "https://img.shields.io/npm/dt/hexo-theme-ayer" >
< / a >
2020-06-12 23:43:39 +00:00
< a href = "https://shen-yu.gitee.io" target = "_blank" rel = "noopener noreferrer" >
2020-09-30 03:01:24 +00:00
< img alt = "platform" src = "https://img.shields.io/badge/platform-PC--ios--android-ff69b4.svg" >
2020-06-12 23:43:39 +00:00
< / a >
2019-12-25 15:27:30 +00:00
< a href = "https://gitter.im/hexo-theme-ayer/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" target = "_blank" rel = "noopener noreferrer" >
< img alt = "Gitter" src = "https://badges.gitter.im/Join%20Chat.svg" >
< / a >
< br >
2020-09-30 03:01:24 +00:00
< a href = "https://www.npmjs.com/package/hexo-theme-ayer" target = "_blank" rel = "noopener noreferrer" >
< img alt = "npm version" src = "https://img.shields.io/npm/v/hexo-theme-ayer" >
2020-03-02 12:12:01 +00:00
< / a >
2020-06-12 23:43:39 +00:00
< img alt = "language" src = "https://img.shields.io/badge/language-ejs--stylus-green.svg" >
2020-09-30 03:01:24 +00:00
< a href = "https://github.com/Shen-Yu/hexo-theme-ayer/releases" target = "_blank" rel = "noopener noreferrer" >
< img alt = "GitHub repo size" src = "https://img.shields.io/github/repo-size/Shen-Yu/hexo-theme-ayer?color=b37feb" >
< / a >
2021-05-18 02:19:02 +00:00
< a href = "https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" target = "_blank" rel = "noopener noreferrer" > < img alt = "LICENSE" src = "https://img.shields.io/badge/LICENSE-SATA-6ccab8" >
2020-06-12 23:43:39 +00:00
< / a >
2019-12-25 15:27:30 +00:00
< / p >
2019-12-25 13:01:24 +00:00
---
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
:ocean: Ayer is a clean and elegant theme for Hexo, also fast, powerful and responsive. It contains many awesome features, It's perfect for your blog, "Ayer" means "water" in Malaysian and "yesterday" in Spanish. If you have any queries or advice during the process of using, Please contact me! shenyu@hotmail.com
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
< b > 注:收藏本主题请点右上角 Star, 谢谢~~ < / b >
< b > 如果你想给主题添砖加瓦,可以点右上角 Fork, 然后给此仓库提交 PR< / b >
2019-12-03 11:37:44 +00:00
2019-12-31 14:59:03 +00:00
### [Preview 预览](https://shen-yu.gitee.io)
### [中文说明](https://shen-yu.gitee.io/2019/ayer/)
2019-12-03 11:37:44 +00:00
2020-01-15 00:25:50 +00:00
### [国内镜像](https://gitee.com/shen-yu/hexo-theme-ayer)
2019-12-04 12:08:19 +00:00
![Screenshot ](screenshots/hexo-theme-ayer.png )
2019-12-03 11:37:44 +00:00
2020-08-24 04:20:00 +00:00
## Install
2019-12-03 11:37:44 +00:00
2020-08-24 04:20:00 +00:00
### For hexo >= 5.0
2021-05-24 03:45:14 +00:00
```shell
2020-08-24 04:20:00 +00:00
npm i hexo-theme-ayer -S
2019-12-03 11:37:44 +00:00
```
2020-08-24 04:20:00 +00:00
- If this theme is newly installed, a `_config.ayer.yml` file will be generated in the root directory after the installation is complete, and you can directly edit the `_config.ayer.yml` file for configuration.
- If it is a theme upgrade, you can use the configuration method of hexo < 5.0 , or you can move the original configuration file to the root directory and rename it to `_config.ayer.yml` .
2021-05-24 03:45:14 +00:00
### For hexo < 5.0
```shell
git clone https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
```
2020-08-24 04:20:00 +00:00
## Enable
2019-12-03 11:37:44 +00:00
Modify `theme` setting in `_config.yml` to `ayer`
2021-05-24 03:45:14 +00:00
```yml
2019-12-03 11:37:44 +00:00
theme: ayer
```
2020-08-24 04:20:00 +00:00
## Update
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
```bash
2019-12-03 11:37:44 +00:00
cd themes/ayer
git pull
```
2020-08-24 04:20:00 +00:00
## Multi Language Support
2021-05-24 03:45:14 +00:00
2021-03-22 02:06:27 +00:00
zh-CN( 中文简体) en( English) zh-TW( 中文繁体) ja( 日本語) es( Español) de( Deutsch) fr( Français) ru( Р у с с кий) ko( 한국어) vi( Tiếng Việt) nl( Nederlands) no( norsk) pt( Português)
2020-08-04 13:04:59 +00:00
2021-03-22 02:06:27 +00:00
English is default languge, if you want to change, modify `language` option in `_config.yml` file in your Hexo blog's root folder.
2020-08-04 13:04:59 +00:00
2020-08-24 04:20:00 +00:00
## Configuration
2019-12-03 11:37:44 +00:00
2020-01-23 03:30:35 +00:00
let me know if you have any questions.
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
```yml
2019-12-29 02:57:24 +00:00
# Menu-Sidebar
2019-12-03 11:37:44 +00:00
menu:
Home: /
Archives: /archives
2020-01-30 06:14:35 +00:00
Categories: /categories
Tags: /tags
2019-12-03 11:37:44 +00:00
Gallery: http://shenyu-vip.lofter.com
Travel: /tags/旅行/
About: /2019/about
2020-01-30 06:14:35 +00:00
# Subtitle and Typing animation
# https://github.com/mattboldt/typed.js
subtitle:
enable: true
2020-01-30 06:36:03 +00:00
text: A clean and elegant theme
text2: It's perfect for your hexo blog
2021-05-24 03:45:14 +00:00
text3: Have fun! #Supports up to three lines of text
2020-01-30 06:14:35 +00:00
startDelay: 0
typeSpeed: 200
loop: true
backSpeed: 100
showCursor: true
2019-12-29 02:57:24 +00:00
# Favicon and sidebar logo
2019-12-03 11:37:44 +00:00
favicon: /favicon.ico
logo: /images/ayer-side.svg
2021-05-24 03:45:14 +00:00
# Cover Setting
2019-12-30 12:22:40 +00:00
# enable: [true|false]; path: [background-image]; logo: [cover-logo-image]
2019-12-03 11:37:44 +00:00
cover:
enable: true
2021-05-24 03:45:14 +00:00
path: /images/cover1.jpg # there are some beautiful cover images in Ayer's directory: /source/images, choose your favorite image to replace it.
2019-12-03 11:37:44 +00:00
logo: /images/ayer.svg
2021-05-24 03:45:14 +00:00
# ProgressBar
2020-03-29 10:18:22 +00:00
progressBar: true
2019-12-03 11:37:44 +00:00
2020-09-01 02:47:02 +00:00
# Boardcast
broadcast:
enable: true
type: 2 # 1: custom, 2: hitokoto api(https://hitokoto.cn/)
text: a clean and elegant theme, fast and responsive. # only work in custom mode
2019-12-29 02:57:24 +00:00
# Article Setting
# (Use this to excerpt if article is too long: <!--more-->)
2019-12-03 11:37:44 +00:00
excerpt_link: Read More...
2020-02-12 04:50:12 +00:00
excerpt_all: false
2020-02-06 15:14:35 +00:00
2020-04-12 13:17:46 +00:00
# Copy code button
copy_btn: true
2020-02-06 15:14:35 +00:00
# Share
share_enable: true
# If you are not in China, maybe you prefer to set:false
share_china: true
2019-12-29 02:57:24 +00:00
# share text
2019-12-03 11:37:44 +00:00
share_text: Share
2019-12-29 02:57:24 +00:00
# search text
2019-12-03 11:37:44 +00:00
search_text: Search
2019-12-29 02:57:24 +00:00
# nav text
2019-12-03 11:37:44 +00:00
nav_text:
page_prev: Prev page
page_next: Next page
post_prev: Newer posts
post_next: Older posts
2019-12-29 02:57:24 +00:00
# Catalog in article
2019-12-03 11:37:44 +00:00
toc: true
2020-01-20 13:02:13 +00:00
# images in the article support click to fullscreen
image_viewer: true
2020-01-07 11:44:35 +00:00
# https://github.com/willin/hexo-wordcount
word_count:
enable: true
# only display in article page(not in index page)
only_article_visit: true
2019-12-29 02:57:24 +00:00
# Reward Setting
# type: 0-close reward; 1-only open in article which you have configured reward:true; 2-open in all articles
2019-12-05 15:31:52 +00:00
reward_type: 2
2019-12-29 02:57:24 +00:00
# reward word
2021-05-24 03:45:14 +00:00
reward_wording: "Buy me a cup of coffee~"
2019-12-29 02:57:24 +00:00
# qrcode image path
2019-12-05 15:31:52 +00:00
alipay: /images/alipay.jpg
2019-12-29 02:57:24 +00:00
# qrcode image path
2019-12-05 15:31:52 +00:00
weixin: /images/wechat.jpg
2020-02-07 04:42:33 +00:00
# Copyright
# type: 0-close all; 1-only display in article which you have configured copyright: true; 2-all articles
copyright_type: 2
2019-12-29 02:57:24 +00:00
# Search
2020-02-12 04:50:12 +00:00
# https://github.com/theme-next/hexo-generator-searchdb
2019-12-03 11:37:44 +00:00
search: true
2019-12-30 12:22:40 +00:00
# RSS
2020-04-21 06:38:15 +00:00
# leave it empty if you dont' need
2019-12-03 11:37:44 +00:00
rss: /atom.xml
2020-03-23 15:04:50 +00:00
# DarkMode
darkmode: true
2020-06-02 08:01:50 +00:00
# Canvas background style: 0-close, 1-moveline
canvas_bg: 0
# Custom mouse pointer, replace /images/mouse.cur
mouse:
enable: false
path: /images/mouse.cur
2020-06-02 12:41:10 +00:00
# Click effect: 0-close, 1-love, 2-boom, 3-particles
click_effect: 0
2020-03-30 11:55:19 +00:00
2020-03-29 10:18:22 +00:00
# articleWidth and sidebarWidth
layout:
article_width: 80rem
sidebar_width: 8rem
2019-12-15 01:23:24 +00:00
# GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/)
2021-05-24 03:45:14 +00:00
github:
2019-12-29 02:57:24 +00:00
# (Set false if you don't need)
2020-12-31 08:10:38 +00:00
enable: false
2019-12-15 01:23:24 +00:00
url: https://github.com/Shen-Yu/hexo-theme-ayer
2019-12-29 02:57:24 +00:00
# pv&uv statistics
2019-12-03 11:37:44 +00:00
busuanzi:
enable: true
2019-12-29 02:57:24 +00:00
# cnzz statistics
2019-12-03 11:37:44 +00:00
cnzz:
enable: true
url: #
2019-12-06 12:21:24 +00:00
# Google Analytics
2021-05-24 03:45:14 +00:00
google_analytics: ""
2019-12-29 02:57:24 +00:00
# Baidu Analytics
2021-05-24 03:45:14 +00:00
baidu_analytics: ""
2019-12-06 12:21:24 +00:00
2020-03-30 12:27:17 +00:00
# Mathjax Support
2019-12-03 11:37:44 +00:00
mathjax: true
2020-03-30 12:27:17 +00:00
# Katex Support
2020-06-03 03:10:59 +00:00
# note: need change the hexo-renderer, npm un hexo-renderer-marked -S && npm i hexo-renderer-markdown-it-katex -S
2020-03-30 12:27:17 +00:00
katex:
enable: false # true
allpost: true
copy_tex: false
2019-12-29 02:57:24 +00:00
# since year
2019-12-03 11:37:44 +00:00
since: 2019
2020-09-04 11:59:16 +00:00
# only for chinese website
# ICP
icp:
enable: false
url: "http://www.beian.miit.gov.cn/"
text: "浙ICP备88888888"
# gongan
gongan:
2020-09-04 12:00:13 +00:00
enable: false
2020-09-04 11:59:16 +00:00
img: /images/beian.png
url: "http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=01234567890123" #link
text: "浙公网安备01234567890123号"
2020-09-07 10:26:26 +00:00
# friends link
friends_link:
Ayer: #site name
# site url
url: https://github.com/Shen-Yu/hexo-theme-ayer
# site icon(optional)
img: /images/ayer.png
GitHub:
url: https://github.com/Shen-Yu
img: https://i.loli.net/2020/09/07/indb4PRYDA98EkN.png
gitee:
url: https://gitee.com/shen-yu
img: https://i.loli.net/2020/09/07/K3AqO7h6krQFlRX.png
Hexo:
url: https://hexo.io
img: https://i.loli.net/2020/09/07/UYGzjo7h68CRWny.png
hexo-tag-chart:
url: https://github.com/Shen-Yu/hexo-tag-chart
img: https://i.loli.net/2020/09/07/GIXBYE5SoylhR1r.png
2020-12-31 08:10:38 +00:00
# Comment: 1、Valine (recommended); 2、Gitalk; 3、Twikoo; 4、MiniValine
# You can close the comment section on one of your posts by marking `comments: false` in front-matter.
# 1、Valine [A fast, simple & powerful comment system](https://github.com/xCss/Valine)
# You need create leancloud account first (https://console.leancloud.app), then put the id|key in below.
2021-05-24 03:45:14 +00:00
leancloud:
2020-12-31 08:10:38 +00:00
enable: true
app_id: #
app_key: #
# Valine Setting
valine:
2021-05-24 03:45:14 +00:00
enable: true
2020-12-31 08:10:38 +00:00
avatar: mp # (https://valine.js.org/avatar.html)
placeholder: Add some comments to my article~ # placeholder
# 2、Gitalk(https://github.com/gitalk/gitalk)
gitalk:
enable: false # true
clientID: # GitHub Application Client ID
clientSecret: # Client Secret
repo: # Repository name
owner: # GitHub ID
admin: # GitHub ID
# 3、Twikoo(https://github.com/imaegoo/twikoo)
twikoo:
enable: false
envId: #
# 4、MiniValine
# See: https://github.com/MiniValine/MiniValine
minivaline:
enable: false
2021-05-31 02:24:23 +00:00
serverURL: https://minivaline.your-domain.com
# advertisement
# if there is an "ad" word in photo or url, it may blocked by adblock or any other browser extensions
ads:
ad_1:
title: vultr优惠vps
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/vultr.png
url: https://www.vultr.com/?ref=8630075
width: 300
ad_2:
title: 云服务器全球购低至2折
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg
url: https://curl.qcloud.com/kvO7hb43
width: 300
2021-07-23 03:47:30 +00:00
# encrypt settings
lock:
enable: false
password: 123456
2019-12-03 11:37:44 +00:00
```
2020-08-24 04:20:00 +00:00
## Plugins
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
- [hexo-generator-search ](https://github.com/wzpan/hexo-generator-search ) (for Local Search)
2019-12-03 11:37:44 +00:00
```yml
$ npm install hexo-generator-searchdb --save
```
2021-05-24 03:45:14 +00:00
2019-12-30 12:22:40 +00:00
Then add the plugin configuration in hexo's configuration file `_config.yml` (note: not the theme's configuration file):
2021-05-24 03:45:14 +00:00
2019-12-03 11:37:44 +00:00
```yml
# Hexo-generator-search
search:
path: search.xml
field: post
format: html
```
2021-05-24 03:45:14 +00:00
- [hexo-generator-feed ](https://github.com/hexojs/hexo-generator-feed ) (for RSS)
2019-12-03 11:37:44 +00:00
```yml
$ npm install hexo-generator-feed --save
```
2021-05-24 03:45:14 +00:00
2019-12-30 12:22:40 +00:00
Then add the plugin configuration in hexo's configuration file `_config.yml` (note: not the theme's configuration file):
2021-05-24 03:45:14 +00:00
2019-12-03 11:37:44 +00:00
```yml
2021-05-24 03:45:14 +00:00
feed:m
2019-12-03 11:37:44 +00:00
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
2021-05-24 03:45:14 +00:00
order_by: -date
2019-12-03 11:37:44 +00:00
```
2021-05-24 03:45:14 +00:00
- [hexo-generator-index-pin-top ](https://github.com/netcan/hexo-generator-index-pin-top ) (for Sticky Post)
```bash
2019-12-03 11:37:44 +00:00
$ npm uninstall hexo-generator-index --save
$ npm install hexo-generator-index-pin-top --save
```
2021-05-24 03:45:14 +00:00
2020-08-24 04:20:00 +00:00
## Categories
2021-05-24 03:45:14 +00:00
```bash
2020-01-13 12:58:07 +00:00
hexo new page categories
```
2021-05-24 03:45:14 +00:00
2020-02-14 04:11:58 +00:00
Then paste following codes to file: /source/categories/index.md
2021-05-24 03:45:14 +00:00
```md
2020-01-13 12:58:07 +00:00
---
title: categories
type: categories
layout: "categories"
---
```
2020-08-24 04:20:00 +00:00
## Tags
2021-05-24 03:45:14 +00:00
2020-01-13 12:58:07 +00:00
Same as categories.
2019-12-03 11:37:44 +00:00
2020-09-07 10:26:26 +00:00
## Friend Links
2021-05-24 03:45:14 +00:00
```bash
2020-09-07 10:26:26 +00:00
hexo new page friends
```
2021-05-24 03:45:14 +00:00
2020-09-07 10:26:26 +00:00
Then paste following codes to file: /source/friends/index.md
2021-05-24 03:45:14 +00:00
```md
2020-09-07 10:26:26 +00:00
---
title: friends
type: friends
layout: "friends"
---
```
2021-05-24 03:45:14 +00:00
Then edit `friends_link` in `_config.yml`
2020-09-07 10:26:26 +00:00
2020-08-24 04:20:00 +00:00
## Gallery
2021-05-24 03:45:14 +00:00
2019-12-03 11:37:44 +00:00
Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.
2021-05-24 03:45:14 +00:00
```md
2019-12-03 11:37:44 +00:00
---
title: Gallery
2021-05-24 03:45:14 +00:00
albums: [["img_url", "img_caption"], ["img_url", "img_caption"]]
2019-12-03 11:37:44 +00:00
---
```
2020-08-24 04:20:00 +00:00
## Toc
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory.
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
- ayer/\_config.yml
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
```bash
# Toc
2019-12-03 11:37:44 +00:00
toc: true
2021-05-24 03:45:14 +00:00
```
2019-12-03 11:37:44 +00:00
2021-05-24 03:45:14 +00:00
- If Toc is turned on in ayer/\_config.yml, then Tocbot will generate a Toc article directory in the title tag of each blog parsing content, but not all blogs require Toc, so in the Front-matter section of markdown Can be closed:
```md
---
2020-03-24 14:19:01 +00:00
no_toc: true
2019-12-03 11:37:44 +00:00
---
2021-05-24 03:45:14 +00:00
```
2019-12-03 11:37:44 +00:00
---
2020-01-15 02:25:12 +00:00
< br / >
2020-09-09 06:07:12 +00:00
2021-03-30 03:37:38 +00:00
## Code Contributors
This project exists thanks to all the people who contribute.
< a href = "https://github.com/Shen-Yu/hexo-theme-ayer/graphs/contributors" > < img src = "https://opencollective.com/ayer/contributors.svg?width=890&button=false" / > < / a >
## Stargazers over time
[![Stargazers over time ](https://starchart.cc/Shen-Yu/hexo-theme-ayer.svg )](https://starchart.cc/Shen-Yu/hexo-theme-ayer)
2020-09-09 06:07:12 +00:00
## License
2021-05-24 03:45:14 +00:00
< a src = "https://github.com/Shen-Yu/hexo-theme-ayer" > Ayer< / a > by < a href = "https://github.com/Shen-Yu" > Eric-Shen< / a > is licensed under < a rel = "license" href = "https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" > SATA-License< / a > .
2020-06-02 02:47:32 +00:00
2020-06-30 06:47:30 +00:00
The basic idea is, whenever using a project using SATA license, people shall star/like/+1 that project and thank the author. Just imagine Google stared your project and send you a thank-you letter because they used your project in github!
2020-09-09 06:07:12 +00:00
< br >
2021-05-24 03:45:14 +00:00
本项目采用< a rel = "license" href = "https://github.com/Shen-Yu/hexo-theme-ayer/blob/master/LICENSE" > SATA< / a > 开源协议,在遵守 MIT 许可证的前提下,你应该马不停蹄的给这个开源项目“点个赞”,比如 github 右上角的 star, 然后你应该感谢这个开源项目的作者, 作者信息可以在许可证头部的版权声明部分找到。< br >
2020-09-09 06:07:12 +00:00
2021-05-24 03:45:14 +00:00
下面是几条 SATA 作者推荐的感谢途径,也是 SATA 包含的内容:
2020-09-09 06:07:12 +00:00
2021-05-24 03:45:14 +00:00
- 给你使用的开源项目的作者发个 Email, 和他交个朋友
- 提出你在使用过程中发现的 BUG 或者提一些建设性的意见
2021-03-29 07:12:09 +00:00
- 告诉你的朋友们这是一个多棒的开源项目
2020-09-09 06:07:12 +00:00
- 当然,你也可以只是在心里默默的感激,不用让全世界都知道