Git Product home page Git Product logo

hexo-theme-anisina's Introduction

Anisina

A simple responsive theme for hexo, with qiniu image cdn support. Ported from Hux Blog and Kaijun Blog. Anisina

Summary

General

  • Author : Haojen Ma
  • Version : 1.0.2
  • Compatibility : Hexo 3 or later

Features

  • Fully responsive
  • Qiniu images CDN support
  • Custom wechat title images
  • Duoshuo/Disqus comment system
  • Google/Baidu analytics
  • Widgets

Install

  1. Download
git clone https://github.com/unnamed42/hexo-theme-Anisina.git [path/to/hexo]/themes/Anisina
  1. Install dependencies
npm install hexo-renderer-ejs hexo-renderer-stylus --save

I assume you have already installed hexo-generator-category, hexo-generator-pagination, hexo-generator-feed, hexo-generator-tag, hexo-generator-archive.

If you want to use word count, install hexo-wordcount; to use site search, install hexo-generator-search.

  1. Modify theme enrty in _config.yml to enable this theme:
theme: Anisina
  1. Regenerate your blog
hexo clean && hexo generate && hexo deploy

Settings

Navigator

nav:
  - name: archive
    url: archives/index.html
    icon: fa-archive
  - name: tags
    url: tags/index.html
    icon: fa-tags
  - name: guestbook
    url: guestbook/index.html
    icon: fa-comment
  - name: about
    url: about/index.html
    icon: fa-user

Every entry will become a shortcut on the upper right corner of your blog. The icon name must exist in Font Awesome. Don't forget to create the corresponding folder and index.md first. You can do it by:

hexo new page [page-name]

PS: We have a special stylesheet for tags page. So the front-matter of tags/index.md must contain layout: tags.

cdn-url

qiniu images cdn or others are supported. Before using, you need to set you own cdn images root path.

  1. set your cdn-url,in your own _config.yml , set cdn-url to your own path
cdn-url: http://you-cdn.com/
  1. update your images to cdn library

  2. in post front-matter section, set your images name

wechat-share: icon-wechat.png
#or
header-img: some-images.png

In the generated HTML code, img src or background-url will be set to http://you-cdn.com/icon-wechat.png or http://you-cdn.com/header-img, etc.

If you don't need cdn, just leave it empty. The default path is hexo's source/img folder.

clip-*

qiniu imageView2 API

cdn-url must be set before using. More information about qiniu imageView2 API, please click here

Analytics

Google Analytics and Baidu Tongji simple config:

#Baidu Analytics**
ba_track_id: 4cc1f2d8f3067386cc5cdb626a202900

#Google Analytics
ga_track_id: 'UA-49627206-1'            # Format: UA-xxxxxx-xx
ga_domain: huangxuan.me

Just checkout the code offered by Google/Baidu, and paste it here, all the rest is already done for you.

Comment

This theme support both Disqus and Duoshuo as the third party discussion system.

duoshuo_username: _short_name_
duoshuo_share: # true or false
# or
disqus_username: _short_name_

Just replace _short_name_ with your Disqus or Duoshuo short name. You can use both at the same time.

You can turn off Duoshuo Share by setting duoshuo_share to false, but Share cannot be used with duoshuo system off.

Widgets

# Set to true to use jQuery based off-line search
# This function requires hexo-generator-search
site_search: true

# Recent contents
list_categories: true
recent_posts: true
recent_comments: true

# If you want to show word count, set to true
# This function requires hexo-wordcount
word_count: true

# Links
friends:
  - title: friend1
    url: http://www.friend1.com

The settings are self-explaining enough.

Featured Tags

featured-tags: true
featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value

Sidebar settings

# Sidebar settings
sidebar: true
sidebar-about-description: "your description here"
sidebar-avatar: avatar-hux.jpg

This will be shown as a sidebar on wide-screen devices on the right side of your blog. Everything will disappear automatically when displayed on a mobile device, this is the so-called responsive design.

SNS Accounts
weibo_username: 
zhihu_username: 
github_username: 
twitter_username: 
facebook_username: 
linkedin_username: 
googleplus_id: # something after your https://plus.google.com/u/0/
steam_id: # something after your https://steamcommunity.com/id/
qq_id: # You need to enable qq online state at http://shang.qq.com/v3/widget.html
tieba_id: 

We've provided many SNS settings as above. All of them will be shown as circle button inside your sidebar.

Excerpt

Usually the first line of your main text will be cut as excerpt without written explicitly. Everything after front-matter and before <!-- more --> is excerpt of your post. You can choose whether to show it in your main text or not by setting show_excerpt:

show_excerpt: false

Post

A front-matter example of a post is shown below:

---
layout: post
title: "Hola 2016"
subtitle: "hi, I'm haojen ma"
date: 2016-05-26 06:00
author: "Haojen Ma"
header-img: "img/post-default.jpg"
wechat-share: "icon_wechat.jpg"
tags: [Movies,Life]
---

Poetry

If your like poetry, you can try poetry layout, that will be cool!

hexo new poetry 'your-poetry-name'

A poetry demo

poetry-demo

Header-img

post header images. if you don't have set ,this will use post default header images.

Custom wechat title images

wechat-share: "icon_wechat.jpg"

when your share post to wechat moments , this post images will show here, if you don't have set ,this will use post header images.

About

  • Give is a Star if you like , fork or jest clone to use , and also you can help me fix bugs and add new feature :)
  • if you have any problem or requirement , just open an issue here and i will help you.
  • thanks kaijun and hux.

License

MIT

hexo-theme-anisina's People

Contributors

haojen avatar

Stargazers

 avatar

Watchers

 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.