A modified version of Hexo theme Pure and Dawn.
Preview of Pure | Preview of Dawn
Please read documentation of Pure for more details.
Execute the following command under your hexo
folder.
git clone https://github.com/snowme34/hexo-theme-symphony.git themes/symphony
Then modify the property theme
of the file hexo/_config.yml
to theme: symphony
After this modification, please make a copy of the _config.yml.example
file called _config.yml
and change the config accordingly.
The iconfont demo can be found here. It is a html file included in the repo, which can be cloned directly and opened locally.
If the pages like Categories
and Tags
are used, please copy the index
files under [blog root]/symphony/_source
to the correspond folders inside [blog root]/source
.
Please add the necessary images to the corresponding path, like donate
and logo
.
Some of the path can be customized in the config files.
Execute the following command to update theme.
cd themes/symphony
git pull
User needs to manually create _config.yml
.
Please note the maintenance of Chinese version is not a focus in this repo.
In the original version, several places were hard-coded as Chinese, like titles and date. Some were hard-coded again as English and others are replaced with variables.
Some additional icons, like Instagram, were added to the iconfont.
A list called Languages
are added to the about-sidebar, behaving same as the Skills
sidebar.
The footer file was changed accordingly.
-
disableDate
Set
true
to disable the date displayed. -
disableWordcount
Set
true
to disable the wordcount displayed. -
copyright
Set
false
to disable the copyright displayed.
sidebar - control the sidebar
none
: Disable sidebar
toc
: Display Catalogue sidebar (when variable toc
is set true
)
custom
: Display customized sidebar, like the About
page
Note: the behavior above was only tested when the sidebar is on the right side of the page.
The bottom bar can only be seen at the end of the post, after comment part is enabled.
The comment number count displayed for the post was removed.
The code block was modified. The modifications were heavily inspired by material-x.
-
Changed font and line-height
Now use
Open Sans
and so on. -
Updated normalize.css
- Add excerpt
- Fix the bug where the subcategories cannot be collapsed under
Categories
page - Add a sidebar-toggle
- Add pink color theme
- Add a line beneath Titles of customized pages
- Add Telegram share support
- Test Google analytics
- Fix menu highlight bug
- Update based on original repo
- Add demo page for iconfont
- After a lot of preparation
npm install hexo-wordcount --save
npm install hexo-generator-json-content --save
npm install hexo-generator-feed --save
npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save
Sometimes you may need to use some data in templates which is not directly available in your posts, or you want to reuse the data elsewhere. For such use cases, Hexo 3 introduced the new Data files. This feature loads YAML or JSON files in source/_data folder so you can use them in your site.
For example, add links.yml in source/_data folder.
add links.yml in source/_data folder.
The format of the link :
Name:
link: http://example.com
avatar: http://example.com/avatar.png
desc: description
Add a number of links, we just need to repeat the format according to the above.
auto Minify html、js、css and make it neat
npm install hexo-neat --save
You can configure this plugin in _config.yml
.
# hexo-neat
neat_enable: true
neat_html:
enable: true
exclude:
neat_css:
enable: true
exclude:
- '*.min.css'
neat_js:
enable: true
mangle: true
output:
compress:
exclude:
- '*.min.js'
npm install hexo-baidu-url-submit --save
translate the chinese title of Hexo blog to english words automatially
npm install hexo-translate-title --save
You can configure this plugin in _config.yml
.
translate_title:
translate_way: google #google | baidu | youdao
youdao_api_key: XXX
youdao_keyfrom: XXX
is_need_proxy: true #true | false
proxy_url: http://localhost:8123
install
npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it-plus --save
You can configure this plugin in _config.yml
.
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
plugins:
- plugin:
name: markdown-it-katex
enable: true
- plugin:
name: markdown-it-mark
enable: false
Article enable mathjax
title: Hello World
mathjax: true