0.2.0 • Published 7 years ago
jsmdlibmgr v0.2.0
Tiny markdown library manager
Install:
Yarn/NPM:
yarn add jsmdlibmgrornpm i jsmdlibmgr
Manually:
- Download
start.js - Put
start.jsnear yourindex.html Include libs:
- Using cdn:
<script src="https://unpkg.com/jsmdlibmgr@0.2.0/dist/tinylibmgr.js"></script> Locally (best):
- download necessary files from
dist/ - put it to
/jsnear yourindex.html
Also, you able to add plugins from https://unpkg.com/jsmdlibmgr/
- download necessary files from
- Using cdn:
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