The documentation site for Spectrum Design Data, built with 11ty (Eleventy).
This site serves documentation for:
- Components: Component API schemas and options
- Tokens: Design tokens with resolved values and alias links
- Registry: Design system registry entries (sizes, states, variants, glossary, etc.)
The site is built from markdown files generated by the markdown-generator tool, which converts structured data from @adobe/spectrum-tokens, @adobe/spectrum-component-api-schemas, and @adobe/design-system-registry into markdown with YAML frontmatter.
- Node.js ~20.12
- pnpm@10.17.1
# Install dependencies (from monorepo root)
pnpm install
# Generate markdown files
moon run markdown-generator:generate
# Copy generated markdown to site source
moon run site:copyContent
# Start development server
moon run site:startThe site will be available at http://localhost:8080/spectrum-design-data/.
- Make changes to source files in
src/ - The development server will automatically reload
- For changes to generated markdown, regenerate and copy:
moon run markdown-generator:generate moon run site:copyContent
The build pipeline consists of several steps:
-
Generate Markdown:
moon run markdown-generator:generate- Converts tokens, components, and registry data to markdown
- Outputs to
tools/markdown-generator/output/
-
Copy Content:
moon run site:copyContent- Copies generated markdown to
docs/site/src/components/,src/tokens/,src/registry/ - These files are gitignored but processed by 11ty
- Copies generated markdown to
-
Build Site:
moon run site:build- 11ty processes markdown files and templates
- Generates static HTML in
../../site/
-
Export:
moon run site:export- Final export step for deployment
- Outputs to
../../site/directory
# Full build pipeline
moon run site:export
# Individual steps
moon run markdown-generator:generate
moon run site:copyContent
moon run site:build
moon run site:exportdocs/site/
├── src/
│ ├── assets/ # CSS and static assets
│ ├── components/ # Generated component markdown (gitignored)
│ ├── data/ # Site metadata and navigation
│ ├── layouts/ # 11ty layout templates (Liquid)
│ ├── pages/ # Static pages and index pages
│ ├── registry/ # Generated registry markdown (gitignored)
│ └── tokens/ # Generated token markdown (gitignored)
├── public/ # Static files (favicon, schemas)
├── scripts/ # Build scripts
├── eleventy.config.js # 11ty configuration
└── package.json
The eleventy.config.js file configures:
- Input:
src/directory - Output:
../../site/directory - Path Prefix:
/spectrum-design-data(for GitHub Pages) - Collections:
components,tokens,registry(from generated markdown) - Git Ignore: Disabled (
setUseGitIgnore(false)) to process generated markdown files
Generated markdown files in src/components/, src/tokens/, and src/registry/ are:
- Created by
markdown-generatortool - Copied during
copyContenttask - Gitignored (in
.gitignore) - Processed by 11ty despite being gitignored
The site is deployed to GitHub Pages via .github/workflows/deploy-docs.yml:
- Cleans the site directory
- Generates markdown files
- Builds and exports the 11ty site
- Builds other documentation apps (visualizer, viewer, etc.)
- Uploads and deploys to GitHub Pages
- moon run site:clean # Clean site directory
- moon run markdown-generator:generate # Generate markdown
- moon run site:export # Build and export siteThis site was migrated from Next.js to 11ty for:
- Simpler static site generation: 11ty is purpose-built for static sites
- Better markdown support: Native markdown processing with frontmatter
- Reduced dependencies: Fewer npm packages, faster builds
- Chatbot indexing: Generated markdown is published to
docs-markdownbranch
The migration included:
- Replacing Next.js pages with 11ty layouts and collections
- Converting React components to Liquid templates
- Updating build pipeline to use 11ty
- Removing React/Next.js dependencies
- Ensure markdown generator ran:
moon run markdown-generator:generate - Copy content:
moon run site:copyContent - Check that files exist in
src/components/,src/tokens/,src/registry/
- Check that all dependencies are installed:
pnpm install - Verify source packages are available:
@adobe/spectrum-tokens@adobe/spectrum-component-api-schemas@adobe/design-system-registry
- Clean and rebuild:
moon run site:clean && moon run site:export
- Ensure port 8080 is available
- Check that markdown files are copied:
moon run site:copyContent - Verify 11ty is installed:
pnpm list @11ty/eleventy
- Markdown Generator (
tools/markdown-generator/): Generates markdown from source data - Publish Markdown Workflow (
.github/workflows/publish-markdown.yml): Publishes markdown todocs-markdownbranch for chatbot indexing