Configuration ⚙️
A reference for site metadata, versions, navigation and footer links, and content.
Create gittydocs.jsonc in your docs folder:
{
"$schema": "https://raw.githubusercontent.com/blankeos/gittydocs/main/gittydocs.schema.json",
"site": {
"name": "Site Name",
"description": "Documentation for my project.",
"version": { "packageJson": "../package.json" },
"logo": "/static/logo.svg",
"favicon": "/static/favicon.ico",
"socialBanner": "/static/social-card.png",
"repo": {
"owner": "username",
"name": "repo",
"ref": "main",
"docsPath": "docs",
},
},
"nav": [
{
"label": "Guide",
"icon": "book",
"items": [
{ "label": "Introduction", "path": "/introduction", "icon": "file" },
{ "label": "Getting started", "path": "/getting-started", "icon": "rocket" },
],
},
],
"navFooter": [
{ "label": "GitHub", "path": "https://github.com/user/repo", "icon": "github" },
],
"ui": {
"breadcrumbs": true,
"pageNavigation": true,
},
"links": {
"github": "https://github.com/user/repo",
"issues": "https://github.com/user/repo/issues",
},
"theme": {
"preset": "default",
"cssFile": "theme.css",
},
"llms": {
"enabled": true,
"path": "llms",
},
}$schema enables autocomplete + validation in editors. For a pinned version, swap main for a tag.
All top-level sections are optional. If you provide site, its name is required. The manifest-version example assumes package.json exists one directory above your docs folder; use a literal version or omit version if it does not.
Options
$schemastring
site.nameRequiredstring
site.versionstring or object
site.descriptionstring
site.logostring
site.faviconstring
site.socialBannerstring
site.repo.ownerRequiredstring
site.repo.nameRequiredstring
site.repo.refstring
- Default
"main"
site.repo.docsPathstring
- Default
"docs"
navarray of navigation items
navFooterarray of footer links
llms.txt, above the version. Omitted or empty adds no custom links. See Footer navigation.ui.breadcrumbsboolean
- Default
true
ui.pageNavigationboolean
- Default
true
links.githubstring
links.issuesstring
links.discordstring
theme.presetstring
- Default
"default"
theme.cssFilestring
- Default
"theme.css"
llms.enabledboolean
- Default
true
llms.pathstring
- Default
"llms"
site.logo, site.favicon, and site.socialBanner can be full URLs or paths to files in public/. Relative paths are resolved with the base URL.
Navigation item options
Every item in nav, including nested items, accepts the same fields:
labelRequiredstring
pathstring
itemsarray of navigation items
accordionboolean
- Default
false
defaultOpenboolean
- Default
false
iconstring
newTabboolean
- Default
true for external HTTP(S), false for internal routes
See Navigation for nested groups, breadcrumbs, search, and previous/next ordering.
Footer navigation
Use navFooter to place utility links in the sidebar's bottom group rather than a main-nav Resources section. Entries render as compact rows in the order you configure, alongside the automatic llms.txt link and above the site version. The version text aligns with the left edge of the footer icons.
labelRequiredstring
pathRequiredstring
iconstring
newTabboolean
- Default
true for external HTTP(S), false for internal routes
The footer schema is strict and link-only: items, accordion, defaultOpen, and unknown fields are rejected. nav remains recursive and unchanged. In TypeScript, the configuration shape is:
type FooterNavItem = {
label: string
path: string
icon?: string
newTab?: boolean
}
type FooterNavigationConfig = {
navFooter?: FooterNavItem[]
}Footer links use the same safe new-tab handling as main navigation: new tabs have rel="noopener noreferrer", an arrow, and a screen-reader announcement. Omit navFooter or set [] to add no custom footer links. links.github and site.repo do not generate a GitHub footer entry; configure it once in navFooter if you want it there.
The built-in llms.txt link is automatic when LLM output is enabled and must not be repeated in nav or navFooter. llms.enabled: false hides that link without hiding your configured footer links or version. Footer links do not change breadcrumb ancestry, previous/next ordering, or search grouping; those use nav.
Site version
Set site.version to one of three forms. The version appears in the sidebar footer beneath navFooter links and the automatic llms.txt link, aligned with the left edge of their icons, with a v prefix (for example, v1.2.3). An existing v prefix is not doubled. If LLM output is disabled, the version can still appear with custom footer links or on its own. Omit version to hide it.
A manifest object must contain exactly one of packageJson or cargoToml, with a nonempty path pointing to a file named package.json or Cargo.toml respectively. Only these two manifest formats are supported intentionally. For Go, Python, Java, or .NET projects, use a literal version; Gittydocs does not infer versions from those ecosystems' files.
{
"site": {
"name": "My project",
"version": { "packageJson": "../packages/cli/package.json" },
},
}Manifest paths are resolved relative to the original docs/config folder, not the current working directory or Gittydocs' copied runtime cache. For repo/docs/gittydocs.jsonc, ../package.json means repo/package.json; ../packages/cli/package.json means repo/packages/cli/package.json. Local manifest paths can point outside the docs folder.
When loading docs from GitHub, manifests come from the same source repository and GitHub ref as the docs. Paths are relative to the source docs folder (docsPath), and .. may reach a parent inside the repository but must not escape its root. Absolute paths, backslash paths, and remote manifest URLs are not supported for GitHub sources. These restrictions also apply to inherited Cargo workspace paths.
Cargo workspace inheritance
Use a Cargo manifest reference:
{
"site": {
"name": "My Rust project",
"version": { "cargoToml": "../crates/cli/Cargo.toml" },
},
}The member can inherit its version from a workspace:
[package]
name = "my-cli"
version.workspace = true[workspace]
members = ["crates/cli"]
[workspace.package]
version = "1.2.3"Gittydocs reads [workspace.package].version from the same manifest when available, or looks for an ancestor workspace Cargo.toml. An explicit [package].workspace directory is resolved relative to the member manifest. version = { workspace = true } is also supported. Point to a member manifest with [package].version when using a virtual workspace root that only contains [workspace].
Missing or invalid manifests
A missing file, invalid JSON/TOML, empty or missing version, or unresolved inherited workspace is an error—not a silently hidden version. Errors identify the manifest path and expected field. Check the original config-relative path, file permissions, or GitHub ref and repository access as applicable.
During local development, referenced manifests and inherited Cargo workspace manifests are watched, including ones outside your docs folder. A failed refresh keeps the watcher running so correcting or recreating the manifest triggers another refresh. Fix initial startup errors before starting the server. GitHub sources are fetched again on restart or rebuild, not watched remotely.
Static Assets / Images
Place images and other static assets in docs/[static]/ or docs/[images]/. Both folders are special: their contents are copied to public/static/ and served from /static/....
docs/
[images]/
hero.pngFor more theming details, presets, and sidebar spacing overrides, see Theming.
Source
Set GITTYDOCS_SOURCE environment variable to point to your docs:
GitHub URL (auto-parsed):
GITTYDOCS_SOURCE=https://github.com/owner/repo/tree/main/docsLocal path (absolute):
GITTYDOCS_SOURCE=/absolute/path/to/docsPage actions and Markdown output
Markdown/MDX pages have a Copy page button with a page-actions menu:
- Copy page as Markdown for LLMs copies readable Markdown. Built-in components become headings and lists, while custom JSX and fenced syntax examples remain intact.
- Open in GitHub opens the original
.mdor.mdxsource file using a GitHubblobURL, not an edit URL or a guessed route filename.site.reposupplies repository metadata; a GitHub source provides a fallback whensite.repois omitted. For local docs, configuresite.repoto enable this action. - View as Markdown opens the generated per-page Markdown in a new tab. It is available when
llms.enabledis notfalseand the page has a Markdown/MDX source file. - Open in ChatGPT and Open in Claude open a prompt referencing the current page URL.
The generated Markdown path follows the source filename, not just the route: deploy/index.mdx at /deploy produces /llms/deploy/index.md. Setting llms.path to "raw" changes that URL to /raw/deploy/index.md. View as Markdown respects the deployment base path; Open in GitHub preserves the original repository-relative source path and ref.
llms.enabled: false disables /llms.txt, per-page Markdown output, the sidebar's llms.txt link, and View as Markdown. Copying a page remains available, as do configured navFooter links and the site version. The llms.txt sidebar link is supplied automatically and opens in a new tab with an arrow; do not add a duplicate to nav or navFooter.
Writing Content
Use .md, .mdx, or .tsx files. Frontmatter optional for Markdown/MDX:
---
title: Page Title
description: Description for SEO
sidebar: true
toc: true
---
# Heading
Content here.titlestring
descriptionstring
sidebarboolean
- Default
true
tocboolean
- Default
true
Custom pages (.tsx)
For fully custom layouts (landings, marketing pages), add a SolidJS page:
// docs/index.tsx
export const sidebar = false
export const toc = false
export const title = "Home"
export const description = "Welcome"
export default function Page() {
return (
<main class="mx-auto max-w-3xl px-6 py-16">
<h1 class="text-4xl font-bold">Welcome</h1>
<p class="mt-4 text-muted-foreground">Custom landing page.</p>
</main>
)
}Named exports mirror MDX frontmatter. sideNav is accepted as an alias for sidebar.
Custom pages are searchable by their exported title and description, even when omitted from a custom nav. Their rendered JSX body is not indexed as Markdown, and they do not get Markdown heading results. Give them meaningful title and description exports.
Every route must have exactly one page file. Gittydocs reports an error when multiple files resolve to the same route—for example, index.tsx and index.mdx both resolve to /. Move the previous home content to an explicit route only when that is your intended information architecture; Gittydocs does not automatically create an /introduction route.
Custom pages can keep private components beside the docs in an underscore-prefixed folder. Gittydocs copies these files for bundling but excludes them from routes, navigation, search, source maps, and llms.txt:
docs/
index.tsx
_components/
Hero.tsx
icons.tsx
landing.css// docs/index.tsx
import { Hero } from "./_components/Hero"
import "./_components/landing.css"Private component folders support .ts, .tsx, .js, .jsx, and .css files.
Files sorted by:
index.*first- Numeric prefix (
01-intro.md) - Alphabetical
Routing follows the folder structure:
index.mdx # /
index.tsx # / (custom page; cannot coexist with index.mdx)
subtopic/index.mdx # /subtopic
subtopic/topic.mdx # /subtopic/topicFor import-free authoring helpers and live demos, see Components. Use .mdx for <Steps>, <Files>, and <Accordions>; ordinary fenced code blocks work in both Markdown and MDX.
Fully Customize
Gittydocs is essentially a template repackaged as a CLI, thinly wrapped around Velite, SolidJS, and Vike. For full control:
bunx gittydocs@latest new docs --ejected
cd docs
bun installEdit velite.config.ts, components, styles. Deploy the same way.
When should I eject?
- I need custom UI or layout changes beyond the config.
- I need to change the content pipeline (custom MDX components or plugins).
- I am okay maintaining a fork that can drift from upstream and get outdated.
