This is a theme base on Hexo Clean Blog Theme, and modfy for more feature and coding style.
Get theme source on github
Features#
- Cover image for posts and pages
- Post toc
- Code syntax highlighting
- MathJax support
- Bootstrap Alert, Card and Label support
- Responsive Images, table and codeblock
- Light Gallery support
- Disqus and Gitalk
- Google Analytics, Busuanzi Statistics and Word counts support
- Tags, Categories and About support
- Pin post at home page support
- Hexo local search
Installation#
- Clone into your hexo blog directory
$ git clone https://github.com/luswdev/hexo-theme-clean.git themes/clean |
Then update your blog’s main _config.yml to set the theme to clean:
# Extensions |
Configuration#
Top Left Label#
The top left label is configured in the theme’s _config.yml. When clicked it will lead to the Home Page.
# Title on top left of menu. Leave empty to use main blog title |
Home Page cover image#
The Home Page cover is configured in the theme’s _config.yml. It will be the same for all index type pages.
# URL of the Home page image |
Favicon image#
The favicon is configured in the theme’s _config.yml.
# Set your own favicon |
Start Year#
This will set archives page button group starting year, if not set, it will start at current year.
Also is footer copyright start year, too.
# Site start year |
Google Analytics#
The Google Analytics Tracking ID is configured in the theme’s _config.yml. It allow us to learn about blog visitors.
# Google Analytics Tracking ID |
Busuanzi#
The Busuanzi is configured in the theme’s _config.yml. It can record site traffic and visitors count.
# Busuanzi Statistics |
Social Account#
Setup the links to your social pages in the theme’s _config.yml. Links are in the footer.
footer: |
New Tags page#
Follow these steps to add a
tagspage that contains all the tags in your site.
- Create a page named
tags
$ hexo new page "tags" |
- Edit the newly created page and set page type to
tagsin the front matter.
title: All tags |
- Add
tagsto the menu in the theme_config.yml:
footer: |
Categories page#
Follow these steps to add a
categoriespage that contains all the categories in your site.
- Create a page named
categories
$ hexo new page "categories" |
- Edit the newly created page and set page type to
categoriesin the front matter.
title: All categories |
- Add
Categoriesto the menu in the theme_config.yml:
footer: |
New About page#
Follow these steps to add a
aboutpage that can write some information about you.
- Create a page named
about
$ hexo new page "about" |
- Edit the newly created page and set page type to
aboutin the front matter.
title: About |
- Add
Aboutto the menu in the theme_config.yml:
footer: |
Writing#
Default post title#
The default post title (used when no title is specified) is configured in the theme’s _config.yml.
|
Post word count#
The post word count can show a post’s word count and read time, you need to install plugin:
npm i --save hexo-wordcount |
And configured in the theme’s _config.yml.
# Post meta |
Post’s Excerpt#
This theme does not support traditional excerpts. To show excerpts on the index page, use subtitle in the front-matter:
|
Post’s Cover Image#
By default, posts will use the home page cover image. You can specify a custom cover in the front-matter:
|
Author#
The post’s author is specified in the posts front-matter:
|
TOC#
We implement TOC and back to top on the TOC menu, which is a dropup menu on the bottom right. Enable it in the theme’s _config.yml.
# Enable post toc |
Card Tag#
You can insert a bs card by using tags, just write something like this:
{% card %} |
I am a card.
Card header#
Also you can put some title into header, just write something like this:
{% card %} |
I am header.
I am a card.
Card footer#
Also you can put some words into footer, just write something like this:
{% card %} |
I am a card.
Card style#
There have 8 style for card, we have:
- primary, secondary, success, danger, warning, info, light, dark.
Just put classes into tag like this:
{% card success %} |
I am success!
You can see all style in Bootstrap doc.
Alert Tag#
You can insert a bs alert by using tags, just write something like this:
{% alert %} |
I am a alert
Alert style#
There have 8 style for alert, we have:
- primary, secondary, success, danger, warning, info, light, dark.
Just put classes into tag like this:
{% alert success %} |
I am success!
You can see all style in Bootstrap doc.
Badge Tag#
You can insert a bs badge by using tags, just write something like this:
{% badge @new! %} |
Badge style#
There have 8 style for badge, we have:
- primary, secondary, success, danger, warning, info, light, dark.
Just put classes into tag like this:
{% badge success @success! %} |
You can see all style in Bootstrap doc.
Detail Tag#
We impliment html detail tag into hexo, just write something like this:
{% spoiler %} |
Details
Something more information at here!
Detail Title#
You can replace Details title to special you want, just write something like this:
{% spoiler Click Me %} |
Click Me
Something more information at here!
MathJax#
You can write LaTeX code in Markdown file and render on post. Just enable in the theme’s _config.yml.
# Enable post mathjax |
And set mathjax to true in the posts front-matter:
|
And so on, you can now write inline LaTeX in post like this:
$(a + b)^2 = a^2 + 2ab + b^2$ |
$(a + b)^2 = a^2 + 2ab + b^2$
Or write a LaTeX block in post like this:
$$ |
$$
\begin{array}{lll}
(a + b)^2 &=& a^2 + 2ab + b^2 \\
(a - b)^2 &=& a^2 - 2ab + b^2
\end{array}
$$
For more information, you can see MathJax Doc.
Comments#
The comments provider is specified in the theme’s _config.yml.
# Comments. Choose one by filling up the information |
You can too hide the comment in the posts front-matter:
|
Post Font-matter#
This is all font-matter you can use.
| Setting | Description | Default |
|---|---|---|
| title | Title | Filename (posts only) |
| subtitle | Sub Title | - |
| date | Published date | File created date |
| tags | Post tags | - |
| category | Post category | - |
| mathjax | Use mathjax or not | false |
| comment | Show comment field or not | true |
| cover | Use special header cover | - |
| pin | Pin this post on home page | false |
Custom#
You can modify your blog yourself by writing custom.styl, it location at
. |
Creator#
This theme was created by Blackrock Digital, adapted for Hexo by Jonathan Klughertz and modfy by LuSkywalker
Version#
- V1.0.0
- Base fuction support.
License#
MIT