<gem-book>
Docute gem implementation
usage
npm i gem-book
npx gem-book -o src docs
configuration file example: book.json.
next use custom elements <gem-book>
import 'gem-book';
import config from './book.json';
html`
<gem-book .config=${config}></gem-book>
`;
or
import { Book } from 'gem-book';
import config from './book.json';
document.body.append(new Book(config));
or
<srcipt src=https://unpkg.com/gem-book></script>
const book = document.createElement('gem-book');
book.config = {...};
document.body.append(book);
sort
<gem-book>
just add the priority number to the document folder name and file name, e.g:
src/examples/hello/docs/
├── 002-guide
│ ├── README.md
│ └── installation.md
├── 003-about.md
└── README.md
output:
├── <README.md h1>
├── Guide
│ ├── <README.md h1>
│ └── Installation
└── About
i18n
put the documents in the folder of the language code
src/examples/hello/docs/
├── en
│ ├── 002-guide
│ │ ├── README.md
│ │ └── installation.md
│ ├── 003-about.md
│ └── README.md
└── zh
├── 002-guide
│ ├── README.md
│ └── installation.md
└── README.md
develop
npm link
npm run watch
npm run example
npm run docs
TODO