hexo-admin

An Admin Interface for Hexo

  • 所有者: jaredly/hexo-admin
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

logo

An admin UI for the Hexo blog engine. Based off of the Ghost interface, with inspiration from svbtle and prose.io.

Hexo Version

For 2.x, use version 0.3.0 of this plugin. Version 1.x and beyond only
support Hexo v3.x.

Contents

Local use vs deployment

This plugin was originally designed as a local editor -- you run hexo locally, use hexo-admin to author posts, and then use hexo generate or hexo deploy to send the generated static HTML files up to github pages or some other static server.

However, hexo-admin can be run on your live blog, as long as you're using a non-static hosting service such as Heroku, DigitalOcean, etc. Static hosting services such as Github pages and Surge.sh does not support running hexo-admin from your live site.
If you're using Hexo admin from your live blog, you should definitely set up a password (see below) -- otherwise anyone will be able to edit your content.

Screenshots

posts view

editor view

Quickstart

1. Setup hexo & create a blog

npm install -g hexo
cd ~/
hexo init my-blog
cd my-blog
npm install

2. Install the admin & start things up

npm install --save hexo-admin
hexo server -d
open http://localhost:4000/admin/

3. Profit!

The UI should be pretty discoverable -- let me know if you can't find something.

4. Password protection

If you're using Hexo admin on your live server, you want some password
protection. To enable this, you just add a few config variables to your hexo
_config.yml:

admin:
  username: myfavoritename
  password_hash: be121740bf988b2225a313fa1f107ca1
  secret: a secret something

The password_hash is the bcrypt hash of your password. The secret is used
to make the cookies secure, so it's a good idea to have it be long and
complicated.

A utility in Hexo admin's Settings can hash your password and generate the admin
section for you. Start Hexo and go to Settings > Setup authentification
and fill out your information. Copy the generated YAML into your _config.yml.

Once that's in place, start up your hexo server and going to /admin/ will
require you to enter your password.

5. Custom post metadata

To add and edit your own post metadata with the admin interface, add the
metadata variable and your custom variables to your hexo _config.yml:

metadata:
  author_id: defaultAuthorId
  language:

You can provide default values that will be used to initialize the metadata
of a new post. These can be either primitives or arrays.

6. Contribute!

Credits

built with ❤ by Jared Forsyth
(@jaredforsyth) using
react, browserify, and less.

主要指标

概览
名称与所有者jaredly/hexo-admin
主编程语言JavaScript
编程语言JavaScript (语言数: 4)
平台
许可证
所有者活动
创建于2014-07-26 05:31:45
推送于2022-12-22 12:43:05
最后一次提交2021-01-31 19:31:02
发布数10
最新版本名称v2.3.0 (发布于 2017-11-10 09:52:48)
第一版名称v0.1.0 (发布于 2014-07-29 17:36:52)
用户参与
星数1.8k
关注者数35
派生数299
提交数159
已启用问题?
问题数186
打开的问题数67
拉请求数30
打开的拉请求数6
关闭的拉请求数18
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?