docsify-to-queryparam-markdown-engine

1.0.0 • Public • Published

docsify-to-queryparam-markdown-engine

Use docsify as markdown engine, get markdown link from queryparam and render

Install

  1. Configure docsify-to-queryparam-markdown-engine (optional):

    <script>
    window.$docsify = {
      queryParamMarkdownEngine: {
        hideClassName: [], // default ['cover','sidebar','sidebar-toggle','github-corner']
      },
    }
    </script>
  2. Insert script into docsify document:

    <script src="//cdn.jsdelivr.net/npm/docsify-to-queryparam-markdown-engine/dist/docsify-to-queryparam-markdown-engine.min.js"></script>

Usage

Write your remote-markdown code like this:

https://retrocode.io/#/?custom=1&mdurl=https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/README.md

It will be replaced by the raw text of the mdurl above into your doc file content.

If queryparam has 'custom=1' then will all 'hideClassName' elements style to 'display:none'

Options

hideClassName

By default, we set the hideClassName as ['cover','sidebar','sidebar-toggle','github-corner'] for you.
However, you can change this options as you like:

window.$docsify = {
  queryParamMarkdownEngine: {
    hideClassName: ['classname'],
  },
}

Example

License

This project is licensed under the MIT license.
Copyright (c) ShowMeBaby (retrocode@qq.com)

Package Sidebar

Install

npm i docsify-to-queryparam-markdown-engine

Weekly Downloads

12

Version

1.0.0

License

MIT

Unpacked Size

16.3 kB

Total Files

7

Last publish

Collaborators

  • retrocode