@neoblog/plugin-custom-page

0.1.1 • Public • Published

neoblog-plugin-custom-page

Add custom page route to NeoBlog.

Usage

see config.js.

Plugin options

new PluginCustomPage(options: IPluginOptions);

interface IPluginOptions {
    file: string,
    type?: PluginCustomPage.ARTICLE | PluginCustomPage.RAW,
    route: string
}

file

The file to renderer. Can be absolute or realtive path.

type

(Optional) How to renderer the file.

  • PluginCustomPage.ARTICLE: (default) renderer this file as article.

  • PluginCustomPage.RAW: renderer this file as article.

route

Route for that file. It will be used in

const router = new KoaRouter();

router.get(option.route, async ctx => {
    // ...
});

Readme

Keywords

Package Sidebar

Install

npm i @neoblog/plugin-custom-page

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

4.72 kB

Total Files

4

Last publish

Collaborators

  • neoblog-the-owner
  • rocka