主要步骤
- 添加站点地图
sitemap.xml
文件和搜索机器人文件robots.txt
- 提交站点到搜索引擎(百度和谷歌)
- hexo针对搜索的优化
添加站点地图
添加站点地图 sitemap.xml
添加hexo插件
1
2npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save修改
_config.yml
配置
1 | sitemap: |
搜索机器人文件robots.txt
在source目录下新建robots.txt
文件,文件内容如下:
1 | User-agent: * |