Skip to content

hexo-admin - An Admin Interface for Hexo[JS]

2015-2-23
This article has been translated using machine translator. It may not perfectly capture the nuances of the original text. I appreciate your understanding in this matter.

Basic Information

  • Name: hexo-admin
  • Version: 0.1.3
  • License: ISC
  • Description: The administrator interface for static blogging program Hexo

My wife don't program, to better use Hexo, I downloaded this plug-in. With its help, my wife can easily edit her Hexo Blog in an intuitive way.

It's really great, however it lack one important feature -- Delete Post, so I added it in [fork of wizicer].

I found another really annoying bug of Hexo itself, which made this plug-in less useful: every time you save file, a duplicated post would appear in local Hexo blog.

(edit: since Hexo 3.0, this issue has been fixed)

The blog of my wife is about photograph, there are lots of opportunity to embed image in blog. She complains a lot about images. Currently, she would like to upload to some place else and then paste the url. There is an open issue raised by author of this plug-in about enhance it with image upload.

There are another severe issue, a new page would be created when you try to edit title, the expected behavior should be rename the page.

(edit: just quick glance, it looks fixed in latest 0.2.0)

Dependencies

Framework Components

  • body-parser : middleware to parse body of http request,not support multipart bodies (used in upload file). One of you must have component in server development. Recently, I prefer using busboy.
  • serve-static : easy to understand by its name, serve static files in server. It used to serve image and style files.
  • react : very famous UI framework maintained by Facebook, it acts as View in MVC architecture.
  • react-router : router library for react, it acts as Controller in MVC architecture.

Basic Components

  • es6-promise : lightweight library for organizing asynchronous, with its help, you can write asynchronous code like writing synchronous code.
  • lodash : a library like underscore with more function,the basic usage is same.
  • marked: A markdown parsing library that claims to be extremely efficient.

Eye-catching components

  • moment: Feature-rich library for manipulating datetimes that can easily convert the time to a human-readable style (e.g., 30 minutes ago).
  • code-mirror : Very famous online code editor, mainly used in this program for highlighting markdown. Note that on npm, the component has been renamed CodeMirror. superagent: An elegant and feature-rich HTTP manipulation (Ajax) component using the streaming interface (Fluent API). superagent-browserify: A wrapper that enables superagent to work with browserify.
  • reactify: A wrapper that enables the ability to convert JSX (primarily a file format used in the React framework) to work with browserify, and is mainly used to make demo sites in this project.

Style components

Other components

It must be mentioned that Hexo is the root of its normal operation, please refer to hexo-admin for installation methods.

Another theme that must be mentioned is the Casper theme, from which the style file '/www/css/screen.css' comes from.

Development methodology

The original author provided a makefile, but for Windows users, this seems not very friendly, although there are omake, cygwin and other options, anyway, the result is that I am useless, so I changed to use grunt on my Wizicer's fork.

If you use the original author's way, it would be the following command:

  • 'npm test': Run the test method, but the project does not have a test case, and this command will tell you that the command does not exist.
  • 'npm prepublish': Initiates the pre-release state, mainly to compile the less file.

If you use wizicer's fork, that's the following command:

  • 'grunt': starts in development state, monitors disk file changes.
  • 'grunt pub': compile the file and prepare it for release.

Summary scoring

Rated on a scale of 1-5, with 5 being the highest

  • Code clarity: 3
  • Maintenance: 1
  • Weakening dependency: 3
  • System stability: 1
  • Author maintenance: 1

Note: This score is the words of the Ice Sorcerer's family and is for reference only