con un clic
holocron
// Holocron is a Mintlify-compatible docs site generator and Vite plugin. Use this skill when creating, migrating, customizing, or deploying a Holocron documentation site.
// Holocron is a Mintlify-compatible docs site generator and Vite plugin. Use this skill when creating, migrating, customizing, or deploying a Holocron documentation site.
| name | holocron |
| repo | https://github.com/remorses/holocron |
| description | Holocron is a Mintlify-compatible docs site generator and Vite plugin. Use this skill when creating, migrating, customizing, or deploying a Holocron documentation site. |
Holocron documentation changes fast. Do not rely on stale training data or repository-relative source paths. Fetch the public docs first, then search them.
Fetch https://holocron.so/sitemap.xml to see all available pages. Append .md to any page URL
to get raw markdown. Never pipe curl output through head, tail, sed -n, or any truncation
command. Read the full output every time.
curl -s https://holocron.so/sitemap.xml
curl -s https://holocron.so/docs/quickstart.md
When the user asks about a specific workflow, fetch the matching page directly:
docs.json config: https://holocron.so/docs/organize/docs-json.mdcurl -fsSL https://holocron.so/docs/quickstart.md
curl -fsSL https://holocron.so/docs/organize/docs-json.md
Use the CLI to create a new docs site with a working template:
npx -y @holocron.so/cli create --name "My Docs" my-docs --skip-auth
The --skip-auth flag skips cloud setup & AI chat setup (suitable for agents and local-only
usage). The template includes vite.config.ts, docs.jsonc, sample pages,
navigation with tabs, anchors, and icons.
After scaffolding, start the dev server:
cd my-docs
pnpm install
pnpm dev
docs.json basicsHolocron reads docs.json, docs.jsonc, or holocron.jsonc. Prefer
docs.jsonc when writing by hand because comments and trailing commas make it
easier to maintain.
Always fetch the schema before adding uncommon config fields:
curl -fsSL https://holocron.so/docs.json
Simple docs.jsonc:
{
"$schema": "https://holocron.so/docs.json",
"name": "Acme",
"description": "Documentation for Acme.",
"colors": { "primary": "#6366f1" },
"icons": { "library": "lucide" },
"navigation": {
"groups": [
{
"group": "Getting Started",
"icon": "lucide:rocket",
"pages": ["index", "quickstart"]
},
{
"group": "Guides",
"icon": "lucide:map",
"pages": ["guides/install", "guides/deploy"]
}
],
"global": {
"anchors": [
{ "anchor": "GitHub", "href": "https://github.com/example/docs", "icon": "lucide:github" },
{ "anchor": "Changelog", "href": "https://github.com/example/docs/releases", "icon": "lucide:newspaper" }
]
}
}
}
Page slugs in navigation.pages map to MDX files. quickstart loads
quickstart.mdx, and guides/install loads guides/install.mdx.
Anchors in navigation.global.anchors are persistent sidebar links visible
across all tabs. Use them for GitHub, Changelog, Discord, or other external
links.
Use prefixed icon names so the source library is explicit:
"icon": "lucide:rocket"
"icon": "fontawesome:brands:github"
Plain names resolve against the configured library. See https://holocron.so/docs/customize/icons.md for the full reference.
If a group has an icon, do not use the same icon on the first page in that group. It looks like a duplicate in the navigation tree.
MDX pages can import .md, .mdx, .tsx, or .ts files. Prefer relative
imports (./ or ../) over absolute / imports. For example, import a root
README as the index page:
---
title: My Project
---
import Readme from '../../README.md'
<Readme />
See https://holocron.so/docs/create/local-imports.md for details.
Do not use MDX JSX components (like <Aside>, <Note>, <CardGroup>,
<Card>, etc.) inside README.md. GitHub does not render markdown inside
unknown HTML tags; content inside them appears as raw unformatted text.
The README should use only standard markdown. MDX-specific components belong in
the .mdx file that imports the README, not in the README itself.
Every MDX page can include YAML frontmatter. See https://holocron.so/docs/create/pages.md for the full fields reference.
---
$schema: https://holocron.so/frontmatter.json
title: Quickstart
description: Build and deploy your first Holocron docs site.
icon: lucide:rocket
tag: NEW
---
When restructuring docs, add redirects in docs.json. See
https://holocron.so/docs/create/redirects.md for the full reference.
Holocron warns about internal links pointing to non-existent pages during build
and dev. Links to redirect sources and static files (.json, .pdf, etc.) are
not flagged. The warning includes the source page, line number, and the
broken href so you can find and fix it quickly.
knownPathsWhen docs are mounted alongside other routes (API endpoints, dashboards, blogs),
internal links to those non-MDX paths trigger false broken-link warnings. Use
the knownPaths field in docs.json to tell Holocron these paths are valid:
{
"knownPaths": ["/api/*", "/dashboard", "/blog/*"]
}
Supported patterns:
"/dashboard" matches only /dashboard."/api/*" matches /api/users, /api/v2/health,
and any other path starting with /api/.Wildcards only work as a trailing /* suffix. Glob patterns like /api/*/users
are not supported.
Always use multi-line form for container components like Callout, Note,
Warning, Info, Tip, Check, Danger, Aside, Accordion, Steps,
Card, Expandable, Panel, Frame, and Prompt.
<Note>
Use `Note` for neutral supporting information.
</Note>
Single-line form can produce bare phrasing children without paragraph wrapping, which changes styling.
Aside is positioning-only and has no visual frame. Always wrap visible content
inside Note, Tip, Info, Warning, Callout, or another framed component.
<Aside>
<Note>
This appears in the sidebar with a proper callout frame.
</Note>
</Aside>
Exception: Aside full can contain TableOfContentsPanel directly.
After creating a new .mdx or .md page, add its slug to docs.jsonc
navigation. Pages not in the navigation tree will not appear in the sidebar
and return 404.
Read the existing navigation structure first, then place the page in the best tab, group, and reading order.
The real docs live in website/src/pages/docs/, not example/src/. The example/
folder is a demo fixture, not the published docs site.
Before adding or editing docs content, always read website/docs.json first
to see the full navigation tree and existing pages. Then decide:
.mdx file and
add it to the best group in website/docs.json.Never append unrelated sections to a page just because it was the last file you had open. Match the topic to the right page or create a new one.
After editing MDX pages, docs.json navigation, or frontmatter, always build the site to
catch issues early. The build surfaces broken internal links, MDX parsing errors, missing pages
referenced in navigation, and rendering problems that the dev server may not show until a page
is visited.
pnpm build
Fix any warnings or errors before considering the changes done. Common issues:
[link](/some-page) pointing to a slug not in navigation.docs.json navigation but no matching .mdx file exists.If the build warns about links to paths that are not MDX pages but do exist at runtime (API
routes, external apps mounted alongside docs, dashboard pages), suppress those warnings with
the knownPaths field in docs.json. See the Broken link detection
section above.
Run --help to see all available commands. Never truncate the output.
npx -y @holocron.so/cli --help
Key commands: login, logout, whoami, deploy, projects list,
projects create, keys list, keys create, keys delete, create.
Before logging in, always check if the user is already authenticated:
npx -y @holocron.so/cli whoami
If whoami succeeds and shows user, orgs, and projects, skip login. Only run
npx -y @holocron.so/cli login if whoami fails.
holocron deploy builds the docs site and uploads it to holocron.so hosting.
It is the fastest way to publish without managing your own server.
npx -y @holocron.so/cli deploy
The command runs the build, uploads only changed files, finalizes the deployment,
and prints the live URL. Use --project prj_xxx if the account has multiple
projects and you are using session auth. Use --branch <name> to override
branch detection for preview deploys.
Auth priority: HOLOCRON_KEY env var > session token from holocron login >
GitHub Actions OIDC token (automatic in GitHub Actions with id-token: write).
See https://holocron.so/docs/deploy/holocron.md for the full reference including deployment URLs, GitHub Actions OIDC setup, and org/project resolution.
Always deploy preview before production. If preview fails, stop.
When adding icons to any element in docs.json or MDX frontmatter, apply them consistently across all siblings at the same level. Inconsistent icon usage looks unfinished and breaks visual rhythm.
Rules:
navigation.global.anchors has an icon, all anchors must.icon, all pages in that group should. Exception: a group with only 1-2 pages where icons add no navigational value.<Card> in a <CardGroup> has an icon prop, every card in that group must.When reviewing or creating navigation and MDX content, scan siblings and fill in missing icons before finishing. Pick icons from the same library (usually Lucide) and choose semantically distinct icons for each item.
Every section and every paragraph must have at least one bold keyword or phrase. Readers skim docs pages; they do not read every word. Bold text acts as anchor points that let the eye jump to the relevant paragraph.
Pick the word or phrase that captures the core idea. Do not bold entire sentences or generic filler words. Bold the specific term, API name, or concept that a reader would scan for.
Use <Aside> often to place supplementary content in the right sidebar column. Asides break the monotony of a single-column text flow and give readers contextual notes exactly where they are relevant. A page with zero asides looks flat and underuses the layout.
Good candidates for Aside content:
Always wrap Aside content in a framed component (Note, Tip, Info, Warning, Callout).
## Authentication
The deploy command authenticates via **GitHub Actions OIDC** when running in CI.
<Aside>
<Info>
If OIDC is not available, fall back to a **`HOLOCRON_KEY`** environment variable
or a session token from `holocron login`.
</Info>
</Aside>
Aim for roughly one Aside per major section (per ## heading). Not every section needs one, but if a page has more than three ## sections without a single Aside, look for opportunities.
Use ASCII diagrams frequently in MDX pages. Always use the diagram language hint on the code fence. Holocron renders diagram fences with special styling; Unicode box-drawing characters and arrows get colored differently from labels.
Layout rules:
```diagram
┌───────────────┐
docs.jsonc ──────►│ Vite Plugin │──────► Build Output
└───────┬───────┘
│
┌───────▼───────┐
│ sync.ts │ MDX files ──► parsed sections
│ (walk nav) │ git SHA diff ──► cache hit/miss
└───────┬───────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
navigation page cache virtual modules
tree.json holocron- holocron-pages
mdx.json holocron-config
```
diagram language hint on the
code fence (```diagram). This renders them with proper styling on the
website instead of plain monospace.--help output through head, tail, or any truncation
command. Always read the full output.