Add Menubar
In the theme folder, we can find the following scripts in the _config.yml file.
1 | # --------------------------------------------------------------- |
The default menubars are home and archives. I want to add tags, categories and about to menubar. The problems appear when I only note off the options in the above scripts.
After investigation about this problem, I find the ansower in this site http://www.360doc.com/content/18/0521/13/14715637_755685918.shtml method one to cite website
this site method two to cite website
Actually, we should add folder with commond hexo new page menubar_name, then corresponding folders will appear in the source folder which is the site configure source folder. Then add configure information in the correspongding index.md.
Take tags for example.
1 | $ hexo new page tags |
We will see follow information in index.md.
1 | --- |
Then we add type: "tags" to the index.md
1 | --- |
Similar methods are used to add categories and about to menubar.
Add local search function to menubar
- install
hexo-generator-search, hexo-theme-next search function depend on this package.
1 | $ npm install hexo-generator-search --save |
- active the local search configure in theme configure file
_config.yml.
1 | # Local search |