项目作者: snowme34

项目描述 :
A neat Hexo theme symphony without any unnecessary animations. Modified hexo-theme-dawn, based on hexo-theme-pure.
高级语言: CSS
项目地址: git://github.com/snowme34/hexo-theme-symphony.git
创建时间: 2018-12-21T19:34:57Z
项目社区:https://github.com/snowme34/hexo-theme-symphony

开源协议:MIT License

下载


Symphony

A modified version of Hexo theme Pure and Dawn.

中文

Preview | iconfont

Preview of Pure | Preview of Dawn

Please read documentation of Pure for more details.

Install theme

Execute the following command under your hexo folder.

  1. 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.

Files for pre-designed pages

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.

Add images

Please add the necessary images to the corresponding path, like donate and logo.

Some of the path can be customized in the config files.

Update theme

Execute the following command to update theme.

  1. cd themes/symphony
  2. git pull

Modifications from original theme

Removed personal theme config file from repo

User needs to manually create _config.yml.

Fixed English translations

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.

Added new icons

Some additional icons, like Instagram, were added to the iconfont.

Additional list in about-sidebar

A list called Languages are added to the about-sidebar, behaving same as the Skills sidebar.

The footer file was changed accordingly.

New variables for post

  • disableDate

    Set true to disable the date displayed.

  • disableWordcount

    Set true to disable the wordcount displayed.

  • copyright

    Set false to disable the copyright displayed.

New behavior of post variable

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.

Disabled sticky bar for post

The bottom bar can only be seen at the end of the post, after comment part is enabled.

Disabled comment number count

The comment number count displayed for the post was removed.

Code block

The code block was modified. The modifications were heavily inspired by material-x.

Style

  • Changed font and line-height

    Now use Open Sans and so on.

  • Updated normalize.css

Todo

  • 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

Install plugin

hexo-wordcount

  1. npm install hexo-wordcount --save

hexo-generator-json-content

  1. npm install hexo-generator-json-content --save

hexo-generator-feed

  1. npm install hexo-generator-feed --save

hexo-generator-sitemap

  1. npm install hexo-generator-sitemap --save

hexo-generator-baidu-sitemap

  1. npm install hexo-generator-baidu-sitemap --save

Data files

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 :

  1. Name:
  2. link: http://example.com
  3. avatar: http://example.com/avatar.png
  4. desc: description

Add a number of links, we just need to repeat the format according to the above.

Blog optimization

hexo-neat

auto Minify html、js、css and make it neat

  1. npm install hexo-neat --save

You can configure this plugin in _config.yml.

  1. # hexo-neat
  2. neat_enable: true
  3. neat_html:
  4. enable: true
  5. exclude:
  6. neat_css:
  7. enable: true
  8. exclude:
  9. - '*.min.css'
  10. neat_js:
  11. enable: true
  12. mangle: true
  13. output:
  14. compress:
  15. exclude:
  16. - '*.min.js'

hexo-baidu-url-submit

  1. npm install hexo-baidu-url-submit --save

hexo-translate-title

translate the chinese title of Hexo blog to english words automatially

  1. npm install hexo-translate-title --save

You can configure this plugin in _config.yml.

  1. translate_title:
  2. translate_way: google #google | baidu | youdao
  3. youdao_api_key: XXX
  4. youdao_keyfrom: XXX
  5. is_need_proxy: true #true | false
  6. proxy_url: http://localhost:8123

Mathjax Support

hexo-renderer-markdown-it-plus

install

  1. npm un hexo-renderer-marked --save
  2. npm i hexo-renderer-markdown-it-plus --save

You can configure this plugin in _config.yml.

  1. markdown_it_plus:
  2. highlight: true
  3. html: true
  4. xhtmlOut: true
  5. breaks: true
  6. langPrefix:
  7. linkify: true
  8. typographer:
  9. quotes: “”‘’
  10. plugins:
  11. - plugin:
  12. name: markdown-it-katex
  13. enable: true
  14. - plugin:
  15. name: markdown-it-mark
  16. enable: false

Article enable mathjax

  1. title: Hello World
  2. mathjax: true