Skip to main content

Overview

/snippets is the repo’s shared import namespace for reusable docs infrastructure content. Today the canonical steady-state model is:
  • assets/ for static files and retained support artifacts
  • components/ for the governed component library
  • composables/ for MDX imported into other MDX pages
  • data/ for shared data modules, generated feed outputs, and snapshots
  • templates/ for copy-ready authoring scaffolds
The canonical root governance model is also now strict:
  • snippets/guide.mdx is the only human-authored source of truth for snippets taxonomy and placement rules
  • snippets/snippets-registry.mdx is generated from the live filesystem plus folder metadata embedded in the guide
snippets/_workspace/ and snippets/automations/ are intentionally excluded from the generated root registry. Mintlify-specific authoring and preview behavior is governed separately in Mintlify Repo Guide.

Root Governance

snippets/guide.mdx

Use the guide for:
  • folder purpose and placement rules
  • how to create new snippet items
  • generated versus manual ownership rules
  • machine-readable folder metadata used by the registry generator

snippets/snippets-registry.mdx

The registry is generated and non-editable. It renders:
  • the full live snippets/ tree
  • folder descriptions for every included folder
  • delegated descriptions for components/** instead of duplicating component governance

Folder Taxonomy

FolderWhat belongs hereWhat does not belong here
snippets/assets/images, logos, videos, downloadable files, retained workflow exportsactive data modules, page composables, runtime scripts
snippets/components/reusable UI/runtime components governed by the component frameworkad hoc local component rules in snippets root docs
snippets/composables/MDX files imported into other MDX pagesJSX data exports, raw assets
snippets/data/generated feed outputs, reference datasets, snapshots, variables, shared content datapage composables, static media
snippets/templates/page and block scaffolds for authorsactive content, runtime components, generated data

Placement Rules

When creating a new snippet item:
  1. If it is .mdx imported into another .mdx page, place it in composables/.
  2. If it is a data module or generated page input, place it in data/.
  3. If it is a static file or retained raw export, place it in assets/.
  4. If it is a reusable component, route it through components/ governance instead of deciding from this page.
  5. If it is a starter scaffold, place it in templates/.
If it does not clearly fit one of those lanes, resolve taxonomy first instead of creating a new top-level bucket.

Components Governance

components/ is governed separately. Use: This snippets inventory page does not restate component placement rules.

Freshness and Generation

The snippets registry is generated by:
node operations/scripts/generators/governance/catalogs/generate-snippets-registry.js --write
Freshness is enforced by:
node operations/tests/unit/snippets-root-governance.test.js
The generated registry should be regenerated whenever:
  • snippets folders move
  • a new included snippets folder is added
  • folder descriptions in snippets/guide.mdx change

Usage Patterns

Importing Components

import { YouTubeVideo } from "/snippets/components/displays/video/Video.jsx";
import { GotoCard } from "/snippets/components/elements/links/Links.jsx";

Importing Data

import { showcaseData } from "/snippets/data/showcase-feed/showcaseData.jsx";
import { forumData } from "/snippets/data/social-feeds/forumData.jsx";

Importing Composables

import ProjectShowcase from "/snippets/composables/pages/home/project-showcase.mdx";
Last modified on April 7, 2026