https://github.com/tool3/rex
🦖 create docs site from README file using docusaurus
https://github.com/tool3/rex
docs docusaurus2 javascript
Last synced: 15 days ago
JSON representation
🦖 create docs site from README file using docusaurus
- Host: GitHub
- URL: https://github.com/tool3/rex
- Owner: tool3
- License: mit
- Created: 2020-07-17T18:52:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T22:16:49.000Z (about 3 years ago)
- Last Synced: 2025-01-26T09:27:13.729Z (about 1 year ago)
- Topics: docs, docusaurus2, javascript
- Language: JavaScript
- Homepage: https://drex.netlify.app/
- Size: 7.57 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rex
[](https://drex.netlify.app)
docusaurus based README docs generator.
seperate your readme to different pages using ``.
see this README in [edit](https://github.com/tool3/rex/edit/master/README.md) mode.
# automagic
rex can create the doc site without any manual editing of the `README` file.
it defaults to a page per main header (e.g 1 `#`),
without any grouping in the docs sidebar (flat).
# use JSON
use HTML comments with json to structure your doces.
For example:
`` will generate a doc with title rex and a new sidebar dropdown will be created with the name About.
> Note that when you write this in your `.md` files be sure to have no space between the ``)
# Run
The easiest way to get started with `rex` is to clone the repo, and copy your `README` file to the root directory.
Once done, run the `create.js` file:
```bash
npm run create
```
The steps performed in `create.js` include:
- create documents in the `docs/` directory from your README.
- map category to documents.
- update `sidebars.js` with the doc to category mapping.
- update `docusaurus.config.js` with the main docs page (defaults to the first page).
# Post Actions
after running the `create.js` file, new docs will now be located under the `docs` directory.
here are some steps to consider after running `create`:
- update logos and title in `docusaurus.config.js` file
- update theme color `--ifm-color-primary` in `./src/css/custom.css`
- add a rex badge to show your support: `[](https://drex.netlify.app)`
# Options
the options you can supply `rex` are as follows:
### title
this will become the document title
### category
this will group together documents in the docs sidebar
### main
set this only once - the main docs page.
defaults to the first page
for example:
```json
{ "title": "Welcome", "main": true }
```
will create the default page for the `Docs` tab.