Skip to content
Back to skills

Documenter Vitepress

ASecurity

Use when setting up or developing a Julia based documentation site with DocumenterVitepress.jl. Also use when the user mentions DocumenterVitepress, VitePress for Julia docs, or wants to preview docs locally with hot reload.

  • 29 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
documentationgoshellbashvuegitfrontenddocumentation

Works with

  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add JuliaGenAI/julia-agent-skills --skill documenter-vitepress --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Documenter Vitepress?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Documenter Vitepress
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/juliagenai-documenter-vitepress/badge)](https://www.skillsdirectory.com/skills/juliagenai-documenter-vitepress)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: documenter-vitepress
description: Use when setting up or developing a Julia based documentation site with DocumenterVitepress.jl.  Also use when the user mentions DocumenterVitepress, VitePress for Julia docs, or wants to preview docs locally with hot reload.
---

# DocumenterVitepress.jl

DocumenterVitepress.jl builds Julia docs using Documenter.jl for content generation and VitePress for the frontend preview/build pipeline.

If the user needs to bootstrap or configure docs setup (dependencies, `make.jl`, CI, `.gitignore`, layout templates), refer to `references/setup-reference.md`.

Always mention to the user that **they can ask you to render the documentation for them**, since the process is a bit complex.  But if they ask the process feel free to explain.

## Local Development Workflow

This skill focuses on the day-to-day local iteration loop after setup already exists.

The fast loop has two stages:

1. Run `makedocs` to regenerate `build/.documenter/` content from `src/`.
2. Run VitePress dev server via `dev_docs` to preview.

### Step 1: Set `build_vitepress = false` in make.jl

```julia
format = DocumenterVitepress.MarkdownVitepress(
    # ... other options ...
    build_vitepress = false,
),
```

This makes `makedocs` emit markdown artifacts only, without running the full VitePress build.

### Step 2: Run makedocs

```julia
include("make.jl")
```

Or from shell:

- Standalone docs repo: `julia --project=. -e 'include("make.jl")'`
- Package docs in `docs/`: `julia --project=docs -e 'include("docs/make.jl")'`

### Step 3: Start the dev server (background process)

`dev_docs` is a long-running process and blocks the current task/thread. Start it in a non-blocking way:

From shell (be sure to run this in the background):

```bash
julia --project=. -e 'using DocumenterVitepress; DocumenterVitepress.dev_docs("build")'
```

From Julia REPL / MCP tool:

```julia
using DocumenterVitepress
Threads.@spawn DocumenterVitepress.dev_docs("build")
```

For package repos where docs live under `docs/`, use `"docs/build"` instead of `"build"`.

The server starts at `http://localhost:SOMEPORT/` with hot reload.  The port number is reported in the output of the command.

Gotcha: `dev_docs` expects the build directory path (for example, `build`), not `build/.documenter`. It appends `/.documenter` internally.

### Step 4: Edit-rebuild-preview cycle

1. Edit files in `src/`
2. Re-run `include("make.jl")`
3. If the generated content changed but the browser did not update, restart `dev_docs`
4. Confirm changes in browser

### Teardown

Before committing, remove `build_vitepress = false` (or set it to `true`) so CI and release builds run the full pipeline.

## Workflow-Specific Gotchas

### npm install ownership (DV-managed vs self-managed)

`npm install` behavior depends on who owns `package.json`:

- **DV-managed npm (default):** If you do **not** provide your own `package.json`, DocumenterVitepress supplies defaults and manages npm dependencies for you during local docs flows.
- **Self-managed npm:** If the repo provides a custom `package.json`, you own npm dependency management. Run `npm install` yourself (especially after dependency changes or lockfile updates) before `dev_docs` or local builds.

Rule of thumb: no custom `package.json` means DV manages npm; custom `package.json` means you manage npm.

### Custom `.vitepress/` theme files

If the repo overrides theme files, keep them in sync with the DocumenterVitepress version used by the project. Breakage here usually shows up during local preview first.

### `deploydocs` must use `DocumenterVitepress.deploydocs`

In `make.jl`, always call `DocumenterVitepress.deploydocs(...)` instead of `Documenter.deploydocs(...)`. The DocumenterVitepress version handles the VitePress build artifacts correctly for deployment. Using the plain `Documenter.deploydocs` will not deploy the VitePress-generated site.

### Manual rebuild expectation

DocumenterVitepress does not continuously re-run `makedocs`. After content changes, re-run `make.jl` and keep `dev_docs` running for browser-side hot reload.

### Customizing the theme or adding Vue components

If you add custom Vue components or theme overrides, keep the full required theme set present:

- `src/.vitepress/theme/index.ts` — theme entry point that registers Vue components
- `src/.vitepress/theme/style.css` — custom CSS
- `src/.vitepress/theme/docstrings.css` — docstring block styling

You can populate all pre-generated Vitepress files by invoking `DocumenterVitepress.generate_template("MyPackage/docs", "MyPackage")`.  Delete everything you do not want to override / customize.

Start from the project's working defaults and then modify. Ensure `index.ts` imports and registers any custom components.

For first-time setup patterns and templates, use `references/setup-reference.md`.

Files in this skill

  • SKILL.md4.7 KB
  • references/setup-reference.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.