The style of this theme is inspired by the earlier stage of Jianshu.com
JSimple is a responsive blog theme for Hexo, including local search, day-night mode, article view count, etc..
cd themes
git clone https://github.com/tangkunyin/hexo-theme-jsimple
yarn add hexo-generator-search hexo-generator-sitemap
- Enable new theme:
theme: hexo-theme-jsimple
- Configure categories, local-search, site-map
# Enable theme
theme: hexo-theme-jsimple
# Enable local search, you must do this, otherwise it will not work for search(when press 'Shift' key)
search:
path: search.json
field: all
content: true
# Sitemap config. It's not necessary.
## Doc: https://github.com/hexojs/hexo-generator-sitemap#readme
sitemap:
rel: true
tags: true
categories: true
path:
- sitemap.xml
- sitemap.txt
# Category settings, need to correspond one-to-one in the theme settings. It is not recommended to have too many article categories
default_category: top1
category_map:
顶部菜单1: top1
顶部菜单2: top2
顶部菜单3: top3
顶部菜单4: top4
Config file under the theme folder, also named _config.yml
. We can put site info, and third extensions in it.
Note: For site statistics and comments, only Google and Disqus are supported, and since there is no intention to support anything else, please do not submit PRs or ISSUES for this, if you need other features, just do it yourself.
PS: The current version brings many updates and optimizations, enough to cover most application scenarios. so use it and cherish it, maybe the last update.
Because the search in the previous version didn't work well. Such as highlighting content, and responsive problems on small screens.
So I replace it with hexo-generator-search
. Thanks for Next theme.
There are two Chinese articles that told how to create local-search in Hexo.
From version 0.0.7
. Google AdSense has been added. If you don't need this, just close it.
I have written some posts for optimizing Hexo usage, if need please refer below articles
All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome.
Looking forward to your pull request.
Special thanks to iTimeTraveler and jiangmuzi, who designed the theme Hipaper and JianShu.
JSimple is under the MIT license. See the LICENSE file for details.