Skip to content
ZenithDocs
English

Project structure

Where ZenithDocs looks for your content and assets.

On this page

Every Markdown or MDX file of the docs directory becomes a page. Where that directory lives depends on how the site is set up.

CLI

my-docs
content
guides
index.mdx
deploy.mdx
meta.json
index.mdx
meta.json
public
favicon.svg
package.json
zenith.config.ts

Pages live in content/. The CLI writes what Astro needs into a .zenith/ directory, which ignores itself in git.

Integration

my-docs
public
favicon.svg
src
content
docs
guides
index.mdx
deploy.mdx
meta.json
index.mdx
meta.json
content.config.ts
astro.config.mjs
package.json

Pages live in src/content/docs/, next to anything else the Astro project holds.

Change the directory with the docsDir option. Files in public/ are copied to the site as they are.

From files to URLs

The file path, relative to the docs directory, gives the page URL.

File URL
index.mdx /
guides/index.mdx /guides/
guides/deploy.mdx /guides/deploy/

Files whose name starts with an underscore are ignored, which is handy for partials and drafts.

Folders

Folders become collapsible groups in the sidebar. A folder’s index page is linked from the group title, and a meta.json file can set its title, icon and page order.

Languages and versions

Translations and older versions are subdirectories of the docs directory, named after their key: fr/installation.mdx is served at /fr/installation/.

Last updated on