Welcome to the Lightdash documentation repository! This repo contains all documentation for Lightdash, built with Mintlify.
- Node.js 18+ installed
- Familiarity with Markdown/MDX
Install the Mintlify CLI to preview documentation changes locally:
# Install Mintlify CLI
npm i -g mintlify
# Start local development server
mintlify dev- Mintlify dev isn't running - Run
mintlify installto re-install dependencies - Page loads as a 404 - Make sure you are running in a folder with
mint.json
Our documentation follows a strict folder structure where images mirror the page structure:
docs/
βββ get-started/ # Onboarding and setup guides
βββ guides/ # Feature guides and how-tos
βββ references/ # API and feature reference docs
βββ dbt-guides/ # dbt-specific guides
βββ self-host/ # Self-hosting documentation
images/
βββ get-started/ # β
Mirrors docs structure
βββ guides/
βββ references/
βββ ...
- Images belong with their pages: A page at
guides/dashboard.mdxshould use images fromimages/guides/dashboard/ - Shared images go higher: If an image is used by multiple pages, place it in the nearest common parent folder
- Use kebab-case: All files and folders use
kebab-case(e.g.,my-new-guide.mdx, notmy_new_guide.mdx)
Thank you for your interest in improving Lightdash's documentation!
-
Choose the right location:
- get-started/: For new users setting up Lightdash
- guides/: Step-by-step instructions for specific tasks
- references/: Detailed feature documentation and API docs
- dbt-guides/: dbt-specific content
-
Create the MDX file with proper frontmatter:
---
title: "Your Page Title"
description: "A brief description (under 160 characters for SEO)"
---
# Your Page Title
Introduction paragraph explaining what this page covers.
## Section 1
Content here...- Add to navigation in
docs.json:
{
"group": "Your Group Name",
"pages": [
"path/to/your-new-page"
]
}- β Good: "How to create a dashboard"
- β Bad: "Dashboards"
- get-started/: Assume no prior Lightdash knowledge
- guides/: Assume basic familiarity
- references/: Technical users who need details
# Page Title (H1 - only one per page)
Brief introduction (2-3 sentences)
## What you'll learn (H2)
- Bullet point 1
- Bullet point 2
## Prerequisites (H2)
- Required setup steps
- Links to other docs
## Step-by-step guide (H2)
### Step 1: Do something (H3)
Detailed instructions...
### Step 2: Do next thing (H3)
More instructions...
## Next steps (H2)
- Link to related guides-
Create a folder matching your page:
guides/my-new-feature.mdx images/guides/my-new-feature/ -
Use descriptive filenames:
- β
Good:
create-dashboard-button.png - β Bad:
screenshot1.png,image.png
- β
Good:
-
Optimize images:
- PNG for screenshots with text
- JPG for photos
- WebP for best compression (when supported)
- Max width: 2000px
- Compress before committing
-
Add images in MDX:
<Frame>
<img src="/images/guides/my-feature/screenshot.png" alt="Descriptive alt text"/>
</Frame>- Use
kebab-case:my-feature-screenshot.png - Be descriptive:
dashboard-settings-modal.pngnotmodal.png - Include state if relevant:
button-hover-state.png
Always include meaningful alt text:
<img src="/images/path/file.png" alt="Dashboard settings showing the theme selector dropdown menu"/>To maintain consistency across the documentation, we use reusable snippets for common callouts and content blocks.
<!-- Enterprise-only features -->
<Snippet file="snippets/callouts/enterprise-only.mdx" />
<!-- Cloud-only features -->
<Snippet file="snippets/callouts/cloud-only.mdx" />
<!-- Self-hosted only features -->
<Snippet file="snippets/callouts/self-hosted-only.mdx" /><!-- Requires admin permissions -->
<Snippet file="snippets/callouts/admin-only.mdx" />
<!-- Beta features -->
<Snippet file="snippets/callouts/beta-feature.mdx" /><!-- dbt prerequisites (includes heading) -->
<Snippet file="snippets/setup/dbt-project-required.mdx" />
<!-- Support channels (includes heading) -->
<Snippet file="snippets/common/support-channels.mdx" />- β Use snippets for standard callouts that appear across multiple pages
- β Use snippets for repeated setup instructions or prerequisites
- β Don't use snippets for page-specific content that won't be reused
If you notice the same content repeated across 3+ pages:
- Create a new snippet file in
/snippets/with an appropriate subdirectory - Use descriptive filenames:
enterprise-only.mdxnotcallout1.mdx - Document the new snippet in this section
- Update existing pages to use the snippet
git checkout -b docs/your-feature-nameBranch naming:
docs/new-feature-guide- New documentationdocs/fix-typo-in-setup- Fixesdocs/update-api-reference- Updates
- Edit or create MDX files
- Add images to the correct folders
- Update
docs.jsonnavigation if needed
mintlify dev- Check all links work
- Verify images display correctly
- Review formatting
Before submitting your PR, run these validation scripts to catch common issues:
# Check for broken internal links and orphaned pages
node scripts/check-links.js
# Check for broken external links (optional, slower)
node scripts/check-links.js --external
# Validate that images are in the correct locations
node scripts/check-image-locations.jsWhat these scripts check:
- check-links.js - Validates all internal markdown and JSX links, verifies linked files exist, and identifies orphaned pages (not in
docs.json) - check-image-locations.js - Ensures images mirror page structure (e.g.,
guides/dashboard.mdxβimages/guides/dashboard/), checks for missing images, and validates file extensions
Automated checks: These scripts run automatically on all PRs via GitHub Actions. The workflow will block merging until all issues are resolved.
Troubleshooting common issues:
- Broken links: Use absolute paths from root (
/guides/my-guidenot../guides/my-guide) and omit file extensions in links - Misplaced images: Images should mirror page structure. Example:
guides/foo/bar.mdxβimages/guides/foo/bar/ - Shared images: Can be placed in the nearest common parent directory
git add .
git commit -m "docs: add guide for custom metrics"Commit message format:
docs: add [feature]- New contentdocs: fix [issue]- Bug fixesdocs: update [page]- Updatesdocs: remove [deprecated content]- Removals
git push origin docs/your-feature-nameThen create a Pull Request with:
- Clear title describing the change
- Description of what changed and why
- Screenshots if relevant
- Link to related issues
- Friendly and approachable: Write like you're helping a colleague
- Clear and concise: Get to the point quickly
- Active voice: "Click the button" not "The button should be clicked"
- Second person: "You can create a dashboard" not "Users can create dashboards"
Use syntax highlighting:
SELECT
user_id,
COUNT(*) as event_count
FROM events
GROUP BY user_id<Note>
Helpful tips and additional context
</Note>
<Warning>
Important warnings about potential issues
</Warning>
<Info>
Informational callouts
</Info>- Use descriptive link text: create a new dashboard
- Not: Click here
Use numbered lists for sequential steps:
- First do this
- Then do this
- Finally do this
Use bullet points for non-sequential items:
- Feature A
- Feature B
- Feature C
Maintain consistency:
- Lightdash (capital L, not lightdash)
- dbt (lowercase, not DBT)
- dashboard (lowercase, not Dashboard)
- metric (not measure or KPI in docs)
- dimension (not attribute or field)
Found a problem in the docs?
- Check if an issue already exists
- Create a new issue with:
- Clear title
- Page URL
- Description of the problem
- Suggested fix (if you have one)
- Slack: #analytics-engineering (for team members)
- GitHub Discussions: For community questions
Changes are automatically deployed to production after pushing to the main branch via our GitHub App integration.