The command kodama compile
or its abbreviation kodama c
will build HTML files based on the input Markdown workspace path. By default, these files are placed in the publish
folder within the workspace path. Even with the --root
parameter, it is still recommended for all users to execute kodama c
in the directory where the index.md
file is located.
$ kodama c --help
Compile current workspace dir to HTMLs
Usage: kodama.exe compile [OPTIONS]
OOptions:
-b, --base <BASE> Base URL or publish URL (e.g. https://www.example.com/) [default: /]
-o, --output <OUTPUT> Path to output dir [default: ./publish]
-r, --root <ROOT> Configures the project root (for absolute paths) [default: ./]
-d, --disable-pretty-urls Disable pretty urls (`/page` to `/page.html`)
-s, --short-slug Hide parents part in slug (e.g. `tutorials/install` to `install`)
-f, --footer-mode <FOOTER_MODE> Specify the inline mode for the footer sections [default: link] [possible values: link, embed]
-h, --help Print help
For example, if the final deployment URL is https://www.example.com/blog, which is not the root directory of the domain, to ensure the correctness of the generated links, the user should specify the --base
compilation parameter, like so:
kodama c -b=https://www.example.com/blog
Note that this is only necessary if you are deploying to a specific subdirectory.
If you are using it locally, you don’t need to consider this issue.