为hexo添加RSS订阅
安装hexo-generator-feed
在hexo根目录下执行下列命令
npm install hexo-generator-feed --save
然后在_config.yml 中配置如下:
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: icon.png
我用的主题是hexo-theme-melody,在主题对应的_config.yml中的social下加入
social:
rss fa: /atom.xml
然后hexo g重新渲染,hexo s重启项目,就可以在首页看到RSS按钮了。
为hexo添加hexo-admin组件
准备工作
已安装好hexo,选择好自己的主题(我选择的主题是melody),并部署到GitHub等静态托管服务器上。
插件介绍
hexo-admin 是一个Hexo博客引擎的管理用户界面插件。这个插件最初是作为本地编辑器设计的,在本地运行hexo使用hexo-admin编写文章,然后通过hexo g或hexo d(hexo g是本地渲染,hexo d是将渲染的静态页面发布到GitHub)将生成的静态页面发布到GitHub等静态服务器。如果你使用的是非静态托管服务器,比如自己买的主机搭建的hexo,那么一定要设置hexo-admin 的密码,否则谁都可以编辑你的文章。
插件安装
首先进入hexo创建的博客项目的根目录下,执行
npm install --save hexo-admin
mac可能需要root权限,前面加个sudo 就可以了。如果报错缺少组件,则缺少什么安装什么,npm install 加缺少的组件。
运行下列命令启动hexo-admin :
hexo server -d
打开 http://localhost:4000/admin/ 就可以访 ...
Hello World
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 Start
Create a new post
$ hexo new "My New Post"
More info: Writing
Run server
$ hexo server
More info: Server
Generate static files
$ hexo generate
More info: Generating
Deploy to remote sites
$ hexo deploy
More info: Deployment