Skip to content

Public API

# DocumenterVitepress.DocumenterVitepressModule.
julia
DocumenterVitepress

Similar to DocumentationMarkdown.jl but designed to work with vitepress.

source


# DocumenterVitepress.MarkdownVitepressType.
julia
MarkdownVitepress(; repo, devbranch, devurl, kwargs...)

This is the main entry point for the Vitepress Markdown writer.

It is a config which can be passed to the format keyword argument in Documenter.makedocs, and causes it to emit a Vitepress site.

Quick start

When invoking Documenter.makedocs, replace the default format=Documenter.HTML(...) with:

julia
format=DocumenterVitepress.MarkdownVitepress(; repo = "...", devbranch = "...", devurl = "...")

Keyword arguments (config)

  • deploy_url: Required: The URL of the repository to which the documentation will be deployed. This must be the full URL, like rafaqz.github.io/Rasters.jl or geo.makie.jl.

  • repo: Required: The full URL of the repository to which the documentation will be deployed.

  • devbranch: Required: The name of the development branch, like master or main.

  • devurl: Required: The URL path to the development site, like dev or dev-branch.

  • description: A description of the website as a String.

  • build_vitepress: Determines whether to build the Vitepress site or only emit markdown files. Defaults to true, i.e., building the full Vitepress site.

  • install_npm: Determines whether to run npm install before building the Vitepress site. Defaults to true.

  • md_output_path: The path to which the Markdown files will be output. Defaults to $build/.documenter.

  • clean_md_output: Determines whether to clean up the Markdown assets after build, i.e., whether to remove the contents of md_output_path after the Vitepress site is built. Options are:

    • nothing: Default. Only remove the contents of md_output_path if the documentation will deploy, to save space.

    • true: Removes the contents of md_output_path after the Vitepress site is built.

    • false: Does not remove the contents of md_output_path after the Vitepress site is built.

  • deploy_decision: DeployDecision from Documenter.jl. This is used to determine whether to deploy the documentation or not. Options are:

    • nothing: Default. Automatically determine whether to deploy the documentation.

    • Documenter.DeployDecision: Override the automatic decision and deploy based on the passed config.

    It might be useful to use the latter if DocumenterVitepress fails to deploy automatically. You can pass a manually constructed Documenter.DeployDecision struct, or the output of Documenter.deploy_folder(Documenter.auto_detect_deploy_system(); repo, devbranch, devurl, push_preview).

Extended help

The repo kwarg is used to set the edit link for the documentation.

The devbranch and devurl kwargs are used to set the path of the static site, which Vitepress expects in advance.

source


See e.g. DocumenterVitepress.DocumenterVitepress