文章置顶安装插件需要安装hexo-generator-topindex插件
1npm install hexo-generator-topindex --save
设置置顶给需要置顶的文章增加top参数
123456789--- title: 每天一个linux命令 date: 2017-01-23 11:41:48 top: 1 categories: - 运维 tags: - linux命令 ---
如果存在多个置顶文章,top后的参数越大,越靠前。
开启本地搜索安装插件需要安装hexo-generator-search插件
1npm install hexo-generator-search --save
修改_config.anzhiyu.yml配置文件
12345# Local searchlocal_search: enable: true preload: true CDN:
参数
解释
enable
是否开启本地搜索
preload
预加载,开启后,进入网页后会自动加载搜索文件。关闭时,只有点击搜索按钮后,才会加载搜索文件
...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment