Skip to content

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

License

Notifications You must be signed in to change notification settings

ShowMeBaby/docsify-to-queryparam-markdown-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: ['cover','sidebar','sidebar-toggle','github-corner'], // 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:

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

demo2Url: https://retrocode.io/#/%E6%8A%80%E5%B7%A7/Markdown%E8%AF%AD%E6%B3%95?custom=1

demo3Url: https://retrocode.io/#/?mdurl=https://docsify.js.org/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 set 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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published