💎🖖 Convert Crystal docs into VitePress
BSD-2-CLAUSE License
Crystal docs are awesome, but sometimes you need more control over them.
vitepressify generates a VitePress project with pages from your local or remote Crystal docs.
You can download one of the statically-linked pre-built binaries from the releases page.
They are built & published by our lovely actions.
crystal
- 1.7.3
$ shards build --production --no-debug --release
Vitepressify v1.0.0
Usage:
vitepressify [arguments]
Examples:
vitepressify -i ./docs/index.json
vitepressify -i https://crystal-lang.org/api/1.5.0/ -t 1.5.0
vitepressify -i https://geopjr.github.io/gettext.cr/index.json -u ./vitepressify-docs
Arguments:
-i INDEX, --index=INDEX index.json location. Can be either a local path or a url (e.g. https://libadwaita.geopjr.dev/docs/). Default: ./docs/index.json
-t TAG, --tag=TAG Current release/tag (e.g. 1.0.0). Default: main
-u FOLDER, --update=FOLDER Instead of generating a new project, it attempts to update the one at FOLDER.
-l, --license Show the LICENSE
-h, --help Show this help
If you wanted for example to build a VitePress project using the Crystal API docs from 1.4.0 to 1.5.1, all you have to do is:
1.5.1
.$ vitepressify -i https://crystal-lang.org/api/1.5.1/ -t 1.5.1
This will generate the project in a random named folder, for example vitepress-ujqywe
.
vitepressify
to update that folder with the other versions:$ vitepressify -i https://crystal-lang.org/api/1.5.0/ -t 1.5.0 -u ./vitepress-ujqywe/
$ vitepressify -i https://crystal-lang.org/api/1.4.1/ -t 1.4.1 -u ./vitepress-ujqywe/
$ vitepressify -i https://crystal-lang.org/api/1.4.0/ -t 1.4.0 -u ./vitepress-ujqywe/
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)