Giter VIP home page Giter VIP logo

hexo-theme-annie's Introduction

Annie theme

GitHub issues GitHub top language GitHub license

Annie是一个简单的Hexo博客主题,如果你喜欢散文、诗歌、小说......那么它可能合你心意! ☞预览-1☞预览-2

Features

  1. 文艺、优雅、简洁的博客主题
  2. 页头随机背景+文章缩略图背景
  3. 两种主页模板,主页文章无限加载
  4. 分类页、标签页点击指定分类、标签后,查询并展示相关文章
  5. 相册页可以分类、搜索图片
  6. 相关文章模块:文章页展示与该篇文章相关的系列文章
  7. 文章评论模块:gitalk 、valine 、livere
  8. 文章分享模块:addThis 、baiduShare 、shareThis 、socialShare
  9. 文章统计模块:leancloud 、busuanzi
  10. 文章点赞模块:leancloud
  11. 文章阅读模块:toc目录、进度条、进度百分比
  12. 文章代码模块:代码复制、代码语言提示、5种高亮主题(Refer & use Next' theme
  13. 文章Markdown:支持数学公式(MathJax),color quote(Refer & use Minos' theme)
  14. 站点分析模块:baidu_analytics 、cnzz_analytics 、google_analytics 、tencent_analytics:
  15. 站点文章搜索:local search
  16. 多语言支持:中文简体、中文繁体、英文

Get started

Installation

git clone https://github.com/Sariay/hexo-theme-Annie.git

然后,将站点目录下的_config.yml文件中的theme字段修改为Annie。

确保themes目录下存在名为Annie的文件夹(hexo-theme-Annie→Annie)

Site config

原则上,你应该编辑站点目录下的_config.yml文件。

  • 语言支持
# Site
title: SARIAY-Blog
subtitle:
description:
keywords:
author: Sariay
language:
timezone: 

设置language的值:en | zh-CN |zh-TW

  • 站内搜索

第一步:安装 hexo-generator-search-zip插件

$ npm install hexo-generator-search-zip --save

第二步:编辑站点目录下的_config.yml文件

# 添加下列参数

search:
  path: search.json
  zipPath: search.zip
  versionPath: searchVersion.txt
  field: post
  #field: post, page or all

第三步:编辑主题目录下的_config.yml文件

# 添加下列参数(若不存在),并将enable置为true!

# Local search
# Dependencies: https://github.com/flashlab/hexo-generator-search
local_search:
    enable: true
    # if auto, trigger search by changing input
    # if manual, trigger search by pressing enter key or search button
    trigger: auto
    # show top n results per article, show all results by setting to -1
    top_n_per_article: 2
  • 代码高亮

基于hexo自身的代码块解析插件的特性,弃用hexo-prism-plugin,参考、使用next主题的代码风格。

  1. highlight、line_number的值应为true
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: true
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:
  1. 设置highlight_theme、code_copy(主题目录的config.yml)
# post_code
# normal | night | night blue | night bright | night eighties
highlight_theme: night bright
code_copy:
    enable: true

Theme config

你可以阅读文章 《Annie主题使用说明》 获取相关模块的信息,例如页头背景、相册、评论、文章点赞 !

Post config

每一篇文章都可以设置一张特色图,该特色图将用于主页(文章缩略图)和文章详情页(页头背景)。

文章的模板样例如下,cover即为文章封面图的路径,你可以使用相对路径或绝对路径。

---
title: {{ title }}
date: {{ date }}
cover: https://.../
categories: categories
tags: tags
---

Theme update

如果你使用主题后,几乎未改动代码,那么可以使用下面的命令行更新主题。

cd themes/Annie
git pull

如果你使用主题后,自定义改动相当多的代码,推荐下载源码包以进行定制!

Other questions

如果你有问题反馈: issues (请务必先于issues中寻找答案)

如果你喜欢该主题: starstar越多,更新的动力越大😂)

如果你想定制主题: fork (当然,Annie亦期待你的贡献)

主题交流群如下,招募群主!(1023390049,口令ANNIE)

主题交流群

Contributor

欢迎各种形式的贡献。

Todo

  • 评论功能
  • 文章目录
  • 文章点赞💗
  • 阅读计数
  • 相关文章
  • 相册模块
  • 站点分析统计b421393
  • 文章分享功能b421393
  • 文章目录优化b421393
  • 文章字体调整b421393
  • 语言支持优化 4
  • 相册图片利用 5
  • valine与文章阅读计数的冲突问题,参考valine官网next主题案例(注:当前使用DesertsP版的valine
  • ...

2020.1.7 日新增,欢迎填坑!

  • 评论插件:hypercommentsutterances畅言云评
  • 相册页:寻找替代品
  • 多语言站点:接入翻译接口
  • 优化布局:index-pure
  • 在线聊天:daovoice
  • 增加二维码:便于文章分享和阅读
  • ...

Thanks

hexo-generator-search-zip plugin by Kieran

The index-page layout referenced Diaspora

The archive-page layout referenced Feng'Blog

Other open source...

(Relevant Rights Reserved by Them!)

License

MIT

hexo-theme-annie's People

Contributors

sariay avatar 10veu avatar ohiamfine avatar

Stargazers

wisley wang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.