jsmdlibmgr
v0.2.0
Published
Tiny markdown library manager
Readme
Tiny markdown library manager
Install:
Yarn/NPM:
yarn add jsmdlibmgrornpm i jsmdlibmgr
Manually:
Download
start.jsPut
start.jsnear yourindex.htmlInclude libs:
- Using cdn:
<script src="https://unpkg.com/[email protected]/dist/tinylibmgr.js"></script>- Locally (best):
- download necessary files from
dist/ - put it to
/jsnear 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
libraryIndexoption (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.mdfile 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
