引言

最近在搞Bing的网址提交时被要求提供网站地图,但HEXO本身是不会自动生成站点地图的,需要使用插件来解决。

生成方法

先进入到你的博客根目录

1
$ cd {yourblog_pach}

安装插件

1
$ npm install hexo-generator-sitemap --save
Tips: git bash 似乎不能运行npm

清除缓存并启动服务

1
$ hexo clean&&hexo s

再打开 localhost:4000/sitemap.xml,如果看到类似下图的页面就证明成功了!

sitemap

部署完HEXO后,在yoursite.xxx/sitemap.xml就可以看到网站地图啦,可以拿去提交惹!