新建站点 [new-site][edit]

用户在 安装 , 可以执行 kodama -V kodama --version 检查是否安装成功.

要创建一个新的 Kodama 站点, 请执行:

kodama new site <PATH>

用户可以在该目录的 trees/ 下进行 Markdown Typst 写作.

首次使用 serve , 建议检查 配置文件 [serve] command. 默认命令依赖 miniserve, 你可以安装它, 或改为当前设备可用的本地服务命令. 例如:

command = ["python", "-m", "http.server", "-d", "<output>"]

如果用户需要生成 VSCode 风格的 snippets 文件, 进而借助其 代码补全功能 1, 可在 Kodama 站点文件夹内执行

kodama snip --section

除此之外, kodama snip 也可以用于生成 $\KaTeX$ 宏补全文件和 inline-section 可用代码片段.

$ kodama snip --help

Generate VSCode style snippets file

Usage: kodama snip [OPTIONS]

Options:
  -c, --config <CONFIG>  Path to the configuration file (e.g., "Kodama.toml") [default: ./Kodama.toml]
      --katex            Generate `.vscode/katex.code-snippets`
      --section          Generate `.vscode/section.code-snippets`
      --inline-section   Generate `.vscode/inline-section.code-snippets`
  -h, --help             Print help
1

Snippets 补全功能 在非 VSCode 的编辑器上是否可用需要自行探索.