0.2.4 • Published 4 years ago

@winwin/hexo-editor-server v0.2.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@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' 
})

Hexo-cli and Git

  • If you want to deploy blog, you need to config your hexo deploy and hexo 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 and git 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 to undefined.

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 from get /posts will not have _content and raw property in future version, use post.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
0.2.3

4 years ago

0.2.4

4 years ago

0.2.3-1

4 years ago

0.2.3-0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.1-0

4 years ago

0.2.0

4 years ago

0.2.0-0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.8-0

4 years ago

0.1.7-0

4 years ago

0.1.7

4 years ago

0.1.5-0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.4-0

4 years ago

0.1.3-1

4 years ago

0.1.3-0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago