codasai init [--path]
Initializes a codasai project in --path
or the current directory if --path
is not passed.
codasai preview [--no-open] [--no-run-server]
Renders the current unsaved page, serves it in a local web server and opens it in the browser.
codasai save
Saves the current unsaved page and the workspace to git's history.
codasai build [--base-url]
Exports the guide under .codasai/export/
.
Use --base-url
if you're not serving under your server's root.
Example for hosting under Github Pages:
codasai build --base-url "/REPOSITORY-NAME"
The following should work
cargo build
Create a dummy guide with codasai init dummy
and then
rm -rf $DUMMY_GUIDE/.codasai/theme/
ln -s $CODASAI/runtime/theme $DUMMY_GUIDE/.codasai/theme
The commands above are for creating a symlink to codasai's default theme so that you can modify the theme under this repository and use the dummy guide to see your changes.
Install watchexec and then in a dummy guide run
watchexec -e scss,html,js,md --no-ignore --ignore ".codasai/export" --on-busy-update=restart -- codasai preview --no-open
This will rebuild the preview page every time you make a change. You will have
to open yourself the browser and navigate to http://127.0.0.1:8000/preview
.