jsmdlibmgr
v0.2.0
Published
Tiny markdown library manager
Downloads
18
Readme
Tiny markdown library manager
Install:
Yarn/NPM:
yarn add jsmdlibmgr
ornpm i jsmdlibmgr
Manually:
Download
start.js
Put
start.js
near yourindex.html
Include libs:
- Using cdn:
<script src="https://unpkg.com/[email protected]/dist/tinylibmgr.js"></script>
- Locally (best):
- download necessary files from
dist/
- put it to
/js
near yourindex.html
- download necessary files from
Also, you able to add plugins from https://unpkg.com/jsmdlibmgr/
Usage:
Start a server:
- manually:
node <path/to/>start.js
yarn
/npm run start
@index.html:
TinyLibMgr.init([options]).then(lib => lib.run());
// or
const lib = await TinyLibMgr.init([options]);
lib.run();
- create a library folder passed to
libraryIndex
option (default:/lib
) - create an index.md file as a library root table of contents
- add links to another files or folders as you wish
- every nested folder should include an
index.md
file as a table of contents for current folder (category)
Advanced:
Options:
{
libraryIndex: '/lib', // library index folder path
rootElementId: 'root', // ID of element to render markdown to
syntaxHightlightPreClass: 'sourcecode', // class for source highlight <pre>
debug: false, // debug logging
use: {
emoji: false, // use emoji plugin (vendor lib required)
hljs: false // use highlight plugin (vendor lib required)
}
TODO:
- [ ] add default styling
- [ ] add windows support
- [ ] add more plugins