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-06-12 23:43:39 +00:00
< br >
< a href = "https://hubble.js.org?owner=Shen-Yu&repo=hexo-theme-ayer&start" > < img src = "https://img.shields.io/badge/since-2019-409eff.svg" alt = "Hubble" > < / a >
< a href = "https://shen-yu.gitee.io" target = "_blank" rel = "noopener noreferrer" >
2020-06-12 23:52:13 +00:00
< img alt = "platform" src = "https://img.shields.io/badge/platform-PC--ios--android-e68db8.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 >
< a href = "https://github.com/Shen-Yu/hexo-theme-ayer/releases" target = "_blank" rel = "noopener noreferrer" >
2020-08-15 15:42:31 +00:00
< img alt = "GitHub package.json version" src = "https://img.shields.io/github/package-json/v/Shen-Yu/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-04-28 06:44:39 +00:00
< img alt = "GitHub repo size" src = "https://img.shields.io/github/repo-size/Shen-Yu/hexo-theme-ayer?color=%23af8ddc" >
2020-06-12 23:52:13 +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-efa96e" >
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
2020-02-08 15:49:40 +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
2020-06-30 06:47:30 +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
``` shell
git clone https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
```
### For hexo >= 5.0
``` shell
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` .
## Enable
2019-12-03 11:37:44 +00:00
Modify `theme` setting in `_config.yml` to `ayer`
``` yml
theme: ayer
```
2020-08-24 04:20:00 +00:00
## Update
2019-12-03 11:37:44 +00:00
``` bash
cd themes/ayer
git pull
```
2020-08-24 04:20:00 +00:00
## Multi Language Support
2020-08-04 13:04:59 +00:00
zh-CN( 中文简体) en( English) zh-TW( 中文繁体) ja( Japanese) es( Spanish) de( German) fr( French) ru( Russian) ko( Korean) vi( Vietnamese) nl( Dutch) no( Norwegian) pt( Portuguese)
English is default languge, if you want to change, modify `language` option in `_config.yml` file in your blog's root folder.
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
``` 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
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
2019-12-29 02:57:24 +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
2019-12-30 12:22:40 +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
2019-12-29 02:57:24 +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
2019-12-30 12:22:40 +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-30 12:22:40 +00:00
# Comment: 1、Valine (recommended); 2、Gitalk
2019-12-03 11:37:44 +00:00
2019-12-29 02:57:24 +00:00
# 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.
2019-12-03 11:37:44 +00:00
leancloud:
enable: true
app_id: #
app_key: #
2019-12-29 02:57:24 +00:00
# Valine Setting
2019-12-03 11:37:44 +00:00
valine:
2019-12-29 02:57:24 +00:00
enable: true
2020-01-24 05:06:25 +00:00
verify: false # comment verify
2019-12-29 02:57:24 +00:00
avatar: mp # (https://valine.js.org/avatar.html)
2019-12-30 12:22:40 +00:00
placeholder: Add some comments to my article~ # placeholder
2019-12-03 11:37:44 +00:00
# 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
2019-12-15 01:23:24 +00:00
# GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/)
github:
2019-12-29 02:57:24 +00:00
# (Set false if you don't need)
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
google_analytics: ''
2019-12-29 02:57:24 +00:00
# Baidu Analytics
2019-12-06 12:21:24 +00:00
baidu_analytics: ''
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
2019-12-30 12:22:40 +00:00
# pageFooter (Set true can let more people know this theme, Thanks!)
2019-12-03 11:37:44 +00:00
pageFooter: true
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号"
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
2019-12-30 12:22:40 +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
```
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):
2019-12-03 11:37:44 +00:00
```yml
# Hexo-generator-search
search:
path: search.xml
field: post
format: html
```
2019-12-30 12:22:40 +00:00
+ [hexo-generate-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
```
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):
2019-12-03 11:37:44 +00:00
```yml
2020-01-24 05:06:25 +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: ' '
order_by: -date
```
2019-12-30 12:22:40 +00:00
+ [hexo-generator-index-pin-top ](https://github.com/netcan/hexo-generator-index-pin-top ) (for Sticky Post)
2019-12-03 11:37:44 +00:00
``` bash
$ npm uninstall hexo-generator-index --save
$ npm install hexo-generator-index-pin-top --save
```
2020-08-24 04:20:00 +00:00
## Categories
2020-01-13 12:58:07 +00:00
``` bash
hexo new page categories
```
2020-02-14 04:11:58 +00:00
Then paste following codes to file: /source/categories/index.md
2020-01-13 12:58:07 +00:00
``` md
---
title: categories
type: categories
layout: "categories"
---
```
2020-08-24 04:20:00 +00:00
## Tags
2020-01-13 12:58:07 +00:00
Same as categories.
2019-12-03 11:37:44 +00:00
2020-08-24 04:20:00 +00:00
## Gallery
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.
``` md
---
title: Gallery
albums: [
["img_url","img_caption"],
["img_url","img_caption"]
]
---
```
2020-08-24 04:20:00 +00:00
## Toc
2019-12-03 11:37:44 +00:00
Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory.
+ ayer/_config.yml
``` bash
# Toc
toc: true
```
+ 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
---
```
---
2020-01-15 02:25:12 +00:00
< br / >
2020-06-02 02:47:32 +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-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!