> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livepeer.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets Folder Inventory

> Governance overview for the repo's snippets directory, including the canonical root guide, generated registry, and current folder taxonomy.

## 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 behaviour is governed separately in [Mintlify Repo Guide](/docs-guide/contributing/Mintlify).

## 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

| Folder                  | What belongs here                                                                     | What does not belong here                              |
| ----------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `snippets/assets/`      | images, logos, videos, downloadable files, retained workflow exports                  | active data modules, page composables, runtime scripts |
| `snippets/components/`  | reusable UI/runtime components governed by the component framework                    | ad hoc local component rules in snippets root docs     |
| `snippets/composables/` | MDX files imported into other MDX pages                                               | JSX data exports, raw assets                           |
| `snippets/data/`        | generated feed outputs, reference datasets, snapshots, variables, shared content data | page composables, static media                         |
| `snippets/templates/`   | page and block scaffolds for authors                                                  | active 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:

* [Component Library Overview](../component-library/overview)
* `/docs-guide/frameworks/component-framework-canonical.mdx`
* `/snippets/components/README.md`

This snippets inventory page does not restate component placement rules.

## Freshness and Generation

The snippets registry is generated by:

```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
node operations/scripts/generators/governance/catalogs/generate-snippets-registry.js --write
```

Freshness is enforced by:

```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
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

```jsx theme={"theme":{"light":"github-light","dark":"dark-plus"}}
import { YouTubeVideo } from "/snippets/components/displays/video/Video.jsx";
import { GotoCard } from "/snippets/components/elements/links/Links.jsx";
```

### Importing Data

```jsx theme={"theme":{"light":"github-light","dark":"dark-plus"}}
import { showcaseData } from "/snippets/data/showcase-feed/showcaseData.jsx";
import { forumData } from "/snippets/data/social-feeds/forumData.jsx";
```

### Importing Composables

```jsx theme={"theme":{"light":"github-light","dark":"dark-plus"}}
import ProjectShowcase from "/snippets/composables/pages/home/project-showcase.mdx";
```

## Related Resources

* [Component Library Overview](../component-library/overview)
* [Automations and Workflows](../ai-automations/automations-workflows)
* `/snippets/guide.mdx`
* `/snippets/snippets-registry.mdx`
