hexo-theme-ayer/README.md

268 lines
7.0 KiB
Markdown
Raw Normal View History

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>
2019-12-25 13:01:24 +00:00
<h3 align="center">一个干净且优雅的 Hexo 主题</h3>
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>
<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">
2019-12-29 03:02:30 +00:00
<img alt="GitHub release" src="https://img.shields.io/badge/release-v1.1-blue.svg">
2019-12-25 15:27:30 +00:00
</a>
<img alt="language" src="https://img.shields.io/badge/language-ejs--stylus-orange.svg">
<a href="https://hexo.io/zh-cn/" target="_blank" rel="noopener noreferrer">
<img alt="hexo" src="https://img.shields.io/badge/hexo-%3E%3D3.0-blue.svg">
</a>
<img alt="platform" src="https://img.shields.io/badge/platform-PC--ios--android-cc2e8b.svg">
</p>
2019-12-25 13:01:24 +00:00
---
2019-12-03 11:37:44 +00:00
2019-12-17 06:08:42 +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!
2019-12-03 11:37:44 +00:00
2019-12-25 15:31:54 +00:00
<b>收藏本主题请点右上角Star谢谢~</b>
2019-12-03 11:37:44 +00:00
2019-12-29 02:57:24 +00:00
### [Preview 预览](https://shen-yu.gitee.io)
2019-12-03 11:37:44 +00:00
### [中文说明](https://shen-yu.gitee.io/2019/ayer/)
2019-12-04 12:08:19 +00:00
![Screenshot](screenshots/hexo-theme-ayer.png)
2019-12-03 11:37:44 +00:00
### Install
``` bash
$ git clone https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer
```
### Enable
Modify `theme` setting in `_config.yml` to `ayer`
``` yml
theme: ayer
```
### Update
``` bash
cd themes/ayer
git pull
```
### Configuration
let me know if you cant find something.
``` yml
2019-12-29 02:57:24 +00:00
# Menu-Sidebar
2019-12-03 11:37:44 +00:00
menu:
Home: /
Archives: /archives
Gallery: http://shenyu-vip.lofter.com
Travel: /tags/旅行/
About: /2019/about
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
# enable: [true|false]path: [background-image path]logo: [cover-logo path]
2019-12-03 11:37:44 +00:00
cover:
enable: true
path: /images/cover1.jpg # images目录下附送多张美图可更换
logo: /images/ayer.svg
2019-12-29 02:57:24 +00:00
# ProgressBar
2019-12-03 11:37:44 +00:00
progressBar: ture
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...
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
2019-12-29 02:57:24 +00:00
# Reward Setting
# type0-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-05 15:31:52 +00:00
reward_wording: '请我喝杯咖啡吧~'
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
2019-12-29 02:57:24 +00:00
# Search
2019-12-03 11:37:44 +00:00
search: true
2019-12-29 02:57:24 +00:00
# RSS(npm i hexo-generator-feed)
2019-12-03 11:37:44 +00:00
rss: /atom.xml
2019-12-29 02:57:24 +00:00
# Comment1、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
avatar: mp # (https://valine.js.org/avatar.html)
2019-12-03 11:37:44 +00:00
placeholder: 给我的文章加点评论吧~ # 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
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
# fancybox(Use for gallery, set false if you don't need)
2019-12-03 11:37:44 +00:00
fancybox: true
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: ''
2019-12-29 02:57:24 +00:00
# mathjax
2019-12-03 11:37:44 +00:00
mathjax: true
2019-12-29 02:57:24 +00:00
# since year
2019-12-03 11:37:44 +00:00
since: 2019
2019-12-29 02:57:24 +00:00
# pageFooter (Set true and let more people know this theme, Thanks!)
2019-12-03 11:37:44 +00:00
pageFooter: true
```
### Plugins
+ [hexo-generator-search](https://github.com/wzpan/hexo-generator-search) Local search
```yml
$ npm install hexo-generator-searchdb --save
```
Then add the plugin configuration for hexo's configuration file `_config.yml` (note: not the theme's configuration file):
```yml
# Hexo-generator-search
search:
path: search.xml
field: post
format: html
```
+ [hexo-generate-feed](https://github.com/hexojs/hexo-generator-feed) RSS
```yml
$ npm install hexo-generator-feed --save
```
Then add the plugin configuration for hexo's configuration file `_config.yml` (note: not the theme's configuration file):
```yml
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
order_by: -date
```
+ [hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top)
``` bash
$ npm uninstall hexo-generator-index --save
$ npm install hexo-generator-index-pin-top --save
```
### Post poster
``` md
---
title: Post name
photos: [
["img_url"],
["img_url"]
]
---
```
### Gallery
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"]
]
---
```
### Toc
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
---
toc: false
---
```
---
2019-12-06 12:21:24 +00:00
Inspired by [Ocean](https://github.com/zhwangart/hexo-theme-ocean)
2019-12-17 06:07:19 +00:00
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Ayer</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/Shen-Yu/hexo-theme-ayer" property="cc:attributionName" rel="cc:attributionURL">Eric-Shen</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.