Skip to content

Latest commit

 

History

History
209 lines (176 loc) · 6.75 KB

README-en.md

File metadata and controls

209 lines (176 loc) · 6.75 KB

hexo-theme-archer

preview

Online demo

🎯 Preview theme:Demo

Document

Instruction

  • This theme is inspired by theme yilia and theme huxpro, 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 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

  1. Execute the following commands in Hexo directory.
npm i hexo-generator-json-content --save && npm i --save hexo-wordcount && git clone https://github.com/fi3ework/hexo-theme-archer.git themes/archer
  1. Change the theme property to archer of _config.yml in Hexo directory.
theme: archer
  1. Add sidebar enable support:

Add following properties to the _config.yml in Hexo directory (not archer).

jsonContent:
  meta: true
  pages: false
  posts:
    title: true
    date: true
    path: true
    text: false
    raw: false
    content: false
    slug: false
    updated: false
    comments: false
    link: false
    permalink: true
    excerpt: false
    categories: true
    tags: true

Optional config

Theme configuration

# ========== Profile Column ========== #
# avatar path
avatar:
# author name (if this property is blank, by default using the author property in Hexo configuration)
author:
# signature of blog
signature:
# SNS (you can custom the order)
social:
  email:
  github:
  # wechat and qq should be a path of an qr-code image
  wechat:
  qq:
  telegram:
  weibo:
  zhihu:
  douban:
  facebook:
  twitter:
  instagram:
  stack-overflow:
  segmentFault:
  juejin:
  v2ex:
  linkedin:
  blog:
  others:
  rss: /atom.xml
# friends link
friends:
  friendA:
  friendB:
  friendC:
# about
about:
  # enable about page
  enable: true
  # about heade image
  image:

# ========== Site ========== #
# title of the site (each article will be followed by this value to help SEO)
SEO_title:
# keywords of the site, good for SEO, you also can add specified keyswords for each post at Front-matter
SEO_keywords:
# main title (title in site banner)
main_title:
# subtitle (subtitle in site banner)
subtitle:
# header image (image of site banner)
header_image:
# default post header image
post_header_image:
# 404 page header image
_404_image:

# ========== Search ========== #
algolia_search:
  enable: false
  hits:
    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

# ========== Comment Plugin ========== #
# Currently support directly adding Livere, Gitment, Youyan and Valine, fill the field to enable corresponding plugin
comment:
  # Livere:https://livere.com/
  livere_uid:
  # Disqus:https://disqus.com/
  disqus_shortname:
  # Gitment:https://github.com/imsun/gitment
  gitment_owner:
  gitment_repo:
  gitment_client_id:
  gitment_client_secret:
  # Youyan: http://www.uyan.cc/
  youyan_uid:
  # Valine: site: https://valine.js.org/
  valine_appId:
  valine_appKey:
  valine_placeHolder:

# ========== Analytics ========== #
# enable Busuanzi analytics
busuanzi: true
# fill in pv or uv
busuanzi_pv_or_uv: 'pv'
# custom analytic slogan, '${count}' is the analytic number, DO NOT modify it.
busuanzi_slug: 'PV: ${count} :)'
# Baidu analytics (fill in siteID)
baidu_analytics:
# Google analytics (fill in siteID)
google_analytics:
# CNZZ analytics
CNZZ_analytics:

# ========== Others ========== #
# favicon
favicon:
# truncate length of abstracts in index page (the default is 300, there will be no abstruct if you set it to 0)
truncate_length:
# enable toc
toc: true
# word count & reading time
reading_info: true
# intro height (the default is 50 percents of the screen, you can input other number)
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.

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.

License

MIT