HEXO theme Floblog
Floblog is a HEXO theme that allows user to highly customized.
1. Usage
1.1 Install Floblog
in root directory
1 | |
2.2 Set theme Floblog in the _config.yml of HEXO root directory
1 | |
3.3 enable highlight.js
1 | |
2. Configuration
Floblog offers many functions for user to customized it.
2.1 Basic Configuration
2.1.1 Images
1 | |
2.1.2 Theme color
Use H value in HSL for you theme color.
Then the Floblog will generate secondary color for you.
1 | |
2.1.3 Tags color
When every time tags needs to be shown, it’ll randomly choose one color in the list.
You can use any color code that CSS can parse.
1 | |
2.2 Post Configuration
2.2.1 Post width
You can add width:x(1<= x <= 5, default 5) to the Front-matter to define the width of a post.
This allows users to customize the arrangement of posts on their homepage.
While rendering the index page, the post will be arranged according to the width.
1 | |
2.2.2 TOC(Table Of Contents)
You can add toc:true | false to the Front-matter to decide whether to enable the TOC.
TOC will automatically number headings of different levels, so it is not recommended that you number the headings yourself when writing an article.
The TOC sidebar also contains ToTheTop button and ToTheButtom button(switch to ToTheComments button when comment is enable)
1 | |
You can also customize the text of TOC in theme/_config.yml.
1 | |
2.2.3 Comments
You can add comments:true | false to the Front-matter to decide whether to enable the comments.
1 | |
2.3 Memu Configuration
You can freely customize the position and alignment of the menu.
Items are extendable; you can add other pages, but don’t overdo it.
When the screen pixels are less than 900px, it will automatically switch to a dropdown menu.
It is not recommended to close the menu, otherwise mobile users will not be able to navigate to other pages.
1 | |
2.4 Posts Configuration
Posts in home page.
You can customized its contents and position of read_more button.
If read_more button is disabled, user can still turn to the post by click the post title.
Posts width should be defined in the Font-matter of the post.
1 | |
2.5 Links Configuration
Createsource/_data/links.ymlfile to use it.
It’s extendable.
The links.yml should like this.
1 | |
2.6 Card Configuration
Cards contain some informations and fuctions.
Dark mode is included in the theme controler card.
More components to be developed…
- Main card
- Theme controler card
- Calendar card
- Tag cloud card
- Recommended post card
1 | |
2.7 Other Configuration
2.7.1 Loading
1 | |
2.7.2 Highlight
To enable it, please ensure configurations in 3.3 was set correctly .
Automatically fold when the code block exceeds max_height
1 | |
2.7.3 Search
Search bar in archives page.
Only can search the title of posts.
1 | |
2.8 Footer Configuration
1 | |
2.9 Comments Configuration
This feature has not been tested yet, so please let me know if you encounter any issues.
1 | |