#page #directory #script #inserting #insert #docusaurus #number-indexed

bin+lib t-rex

A script for inserting a new page in a number-indexed Docusaurus directory

3 unstable releases

0.1.1 Jul 3, 2022
0.1.0 Jul 3, 2022
0.0.0 Jul 2, 2022

#35 in #insert

Apache-2.0

13KB
260 lines

Crates.io Crates.io Crates.io

T-rex

A script for inserting a new page in a number-indexed Docusaurus directory as shown here.


Installation

From crates.io:

cargo install t-rex
t-rex --help

Docs

Insert

To insert a new page:

t-rex insert <PATH TO NEW PAGE>

where a new Docusaurus page will be created if a file extension is included in the path, and a directory will be made if there is no extension.

For example, t-rex insert ./docs/05-folder will insert a new folder, while t-rex insert ./docs/05-page.md will insert a new page.

Fix

To remove gaps and reset the indices to start at 0:

t-rex fix <PATH TO DIRECTORY TO FIX> 

Contact

Email: sammy@stegabob.com

Twitter: @stegaBOB

Discord: @stegaBOB#0001

Dependencies

~2–11MB
~96K SLoC