@winwin/hexo-editor-server v0.2.4
@winwin/hexo-editor-server
A koa2 middleware provides @winwin/hexo-editor editing API. Please visit @winwin/hexo-editor homePage
If you have your own server, and using HEXO for blogging, and looking for an editor that can use online anywhere anytime, and ... Bingo! You found it !
I write this project because almost every markdown editor I tried is not convenient enought when writting blog with HEXO. I always have to add tags categories and front-matters mannuly, and run script to generate and deloy(even though it is convenient enough for most people). So I write this one to edit HEXO post in a convenient way by just click click and click.
The is a part of @winin/hexo-editor. See @winin/hexo-editor-client, @winin/hexo-editor-sdk and Hand by hand installation guide too !
API doc is comming soon... You can find it in ./src/controller.js
.
Feature
- Post add/delete/update
- Post puiblish/unpublish/drafts
- categories
- tags
- front-matters
- git push/reset/pull
- hexo generate/deploy/clean
- Custom authentication
Image CDN(use picgo instead)- let me know what you need ...
Installation
npm install --save @winwin/hexo-editor-server
Or other package manager, such as yarn
.
Usage
Core
- Inside your koa app file, mount hexo-editor-server to app.
- Set
opts.hexoRoot
to your hexo blog folder, i.e. the same folder as your hexo_config.yml
file.
// app.js
// mount hexo-editor-server to koa app
hexoeditorserver(app, {
base: '/hexo',
/* auth: */ /* some authentication middleware */
hexoRoot: 'your/blog/path'
})
- See
./example/app.js
, document and @winin/hexo-editor for more usage and examples.
Hexo-cli and Git
- If you want to deploy blog, you need to config your
hexo deploy
andhexo generate
command. see HEXO's doc - If you want to use Git for backup, you need to config Git repository with a remote origin(
git push
andgit pull
).
Options
hexoRoot
: your hexo blog folder, i.e. the same folder as your hexo_config.yml
file. Required.base
: the root url your hexo-editor-server will be runing at. Defulat to/hexo/
.auth
: a custom authentication koa middleware. Default toundefined
.
Notice
This project is on early devleopmemt stage, API may changes everyday you wake up 😜! I will do my best to keep it working at anytime. If not, please send an issue here.
v0.2.0
Posts from get /posts
will not have _content
and raw
property in future version, use post.brief
instead.
Contribute
All kinds of PR are welcomed, including crazy change!
Acknowledgement
hexo-client by gaoyoubo, homepage
hexo-admin by jaredly, homepage
I learnt a lot about hexo usage from them!
Qusar Login Form Card Component by justinatack
Release Note
v0.2.4
- bugfix
v0.2.3
Inside listPosts
- delete
post._contnet
- delete
post.raw
- add
post._whe_brief
v0.2.0
- Add search
- Posst fro
m get /pos
ts will not have_content
andraw
property in future version, usepost.brief
instead. - add
post.brief
for post info
v0.1.9
- fix git add bug caused by git 2.0
v0.1.8
- fix a auth bug
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago