Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
02eef8d
image references match page path
torimwhaley Dec 27, 2025
5ba3e12
matching folder structure for docs groups
torimwhaley Dec 27, 2025
1af1279
consistent folder structure for groups
torimwhaley Dec 27, 2025
ec81dd2
consistent images repo structure
torimwhaley Dec 27, 2025
f68faf9
aligning images structure with repo structure
torimwhaley Dec 27, 2025
55cfdb3
contributing.md
torimwhaley Dec 27, 2025
ea36a93
file name formatting
torimwhaley Dec 27, 2025
d0b7e24
snippets
torimwhaley Dec 27, 2025
3b871c6
fix links
torimwhaley Dec 27, 2025
e1a2cbe
correcting image path
torimwhaley Dec 27, 2025
6835106
lightdash way bolt
torimwhaley Dec 27, 2025
7f80466
bolt part 2
torimwhaley Dec 27, 2025
ebfc560
icon part 3
torimwhaley Dec 27, 2025
6726651
icon 4
torimwhaley Dec 27, 2025
6eb1f78
icon 4
torimwhaley Dec 27, 2025
c7dab02
fix missing images
torimwhaley Dec 29, 2025
ff31fec
Revert "fix missing images"
torimwhaley Dec 29, 2025
d381b0e
fix images
torimwhaley Dec 29, 2025
fddeb00
fixing image rendering
torimwhaley Dec 29, 2025
f45a395
fix remaining images
torimwhaley Dec 29, 2025
5ace8af
accordion fix
torimwhaley Dec 29, 2025
3f761e5
fix images on several pages
torimwhaley Dec 29, 2025
c829ce4
image change
torimwhaley Dec 29, 2025
8c7da32
fix img src=
torimwhaley Dec 29, 2025
3467a49
test claude
torimwhaley Dec 29, 2025
fa7fce7
additional fixes from claude
torimwhaley Dec 29, 2025
8e5f351
fix deployment errors
torimwhaley Dec 29, 2025
cb07e60
semi-final updates
torimwhaley Dec 29, 2025
64af273
final touches
torimwhaley Dec 29, 2025
d0b863b
Merge branch 'main' into organize-repo
torimwhaley Dec 31, 2025
c75bd7c
taking care of one image
torimwhaley Dec 31, 2025
814fee0
redirects
torimwhaley Dec 31, 2025
17a57e5
redirect links
torimwhaley Dec 31, 2025
8a3e370
adding back cut off pages
torimwhaley Dec 31, 2025
a9e4624
Fix content loss in 4 moved files
torimwhaley Dec 31, 2025
b1b4dcf
fix header links
torimwhaley Dec 31, 2025
05d1375
additional redirect links
torimwhaley Dec 31, 2025
e319235
image paths
torimwhaley Dec 31, 2025
258e59d
last push
torimwhaley Dec 31, 2025
418ddbe
resolve merge errors
torimwhaley Dec 31, 2025
9a3f583
merging images from image updates
torimwhaley Dec 31, 2025
3477516
Merge remote-tracking branch 'origin/main' into organize-repo
torimwhaley Dec 31, 2025
6c97334
adding browse back
torimwhaley Dec 31, 2025
eaac17f
Merge branch 'main' into organize-repo
torimwhaley Dec 31, 2025
fb516b1
removing images in wrong directory
torimwhaley Dec 31, 2025
86da2db
test
torimwhaley Jan 1, 2026
caf870c
merge updates
torimwhaley Jan 1, 2026
60ddff8
does this fix content page?
torimwhaley Jan 1, 2026
e7987b3
removing unused files
torimwhaley Jan 1, 2026
abf512e
last push
torimwhaley Jan 1, 2026
3f827eb
manual review
torimwhaley Jan 1, 2026
8f659ff
removing duplicate "
torimwhaley Jan 1, 2026
c1a69c6
remove duplicate "
torimwhaley Jan 1, 2026
0c51d4d
fix error
torimwhaley Jan 1, 2026
4afc2a1
adding back quote
torimwhaley Jan 1, 2026
bc17fd7
push change
torimwhaley Jan 1, 2026
9df8943
adding image back
torimwhaley Jan 1, 2026
d545bb5
removing unused snippets
torimwhaley Jan 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
375 changes: 375 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,375 @@
# Contributing to Lightdash Documentation

Thank you for your interest in improving Lightdash's documentation! This guide will help you contribute effectively.

## πŸ“‹ Table of Contents

- [Getting Started](#getting-started)
- [Documentation Structure](#documentation-structure)
- [Writing Guidelines](#writing-guidelines)
- [Image Guidelines](#image-guidelines)
- [Using Reusable Snippets](#using-reusable-snippets)
- [Submitting Changes](#submitting-changes)
- [Style Guide](#style-guide)

## πŸš€ Getting Started

### Prerequisites

- Node.js 18+ installed
- Familiarity with Markdown/MDX
- Basic understanding of Lightdash features

### Local Development

```bash
# Clone the repository
git clone https://github.com/lightdash/mintlify-docs.git
cd mintlify-docs

# Install dependencies (if using Mintlify CLI)
npm install -g mintlify

# Start local development server
mintlify dev
```

## πŸ“ Documentation Structure

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/
└── ...
```

### Key Principles

1. **Images belong with their pages**: A page at `guides/dashboard.mdx` should use images from `images/guides/dashboard/`
2. **Shared images go higher**: If an image is used by multiple pages, place it in the nearest common parent folder
3. **Use kebab-case**: All files and folders use `kebab-case` (e.g., `my-new-guide.mdx`, not `my_new_guide.mdx`)

## ✍️ Writing Guidelines

### Creating a New Page

1. **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

2. **Create the MDX file** with proper frontmatter:

```mdx
---
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...
```

3. **Add to navigation** in `docs.json`:

```json
{
"group": "Your Group Name",
"pages": [
"path/to/your-new-page"
]
}
```

### Content Best Practices

#### Use Clear, Action-Oriented Titles
- βœ… **Good**: "How to create a dashboard"
- ❌ **Bad**: "Dashboards"

#### Write for Your Audience
- **get-started/**: Assume no prior Lightdash knowledge
- **guides/**: Assume basic familiarity
- **references/**: Technical users who need details

#### Structure Your Content
```mdx
# 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
```

## πŸ–ΌοΈ Image Guidelines

### Adding Images

1. **Create a folder matching your page**:
```
guides/my-new-feature.mdx
images/guides/my-new-feature/
```

2. **Use descriptive filenames**:
- βœ… **Good**: `create-dashboard-button.png`
- ❌ **Bad**: `screenshot1.png`, `image.png`

3. **Optimize images**:
- PNG for screenshots with text
- JPG for photos
- WebP for best compression (when supported)
- Max width: 2000px
- Compress before committing

4. **Add images in MDX**:

```mdx
<Frame>
<img src="/images/guides/my-feature/screenshot.png" alt="Descriptive alt text"/>
</Frame>
```

### Image Naming Convention

- Use `kebab-case`: `my-feature-screenshot.png`
- Be descriptive: `dashboard-settings-modal.png` not `modal.png`
- Include state if relevant: `button-hover-state.png`

### Accessibility

Always include meaningful alt text:
```mdx
<img src="/images/path/file.png" alt="Dashboard settings showing the theme selector dropdown menu"/>
```

## πŸ” Using Reusable Snippets

To maintain consistency across the documentation, we use reusable snippets for common callouts and content blocks.

### Available Snippets

#### Feature Availability Callouts

Use these to indicate which plans or deployment types support a feature:

```mdx
<!-- 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" />
```

#### Permission & Access Callouts

```mdx
<!-- Requires admin permissions -->
<Snippet file="snippets/callouts/admin-only.mdx" />

<!-- Beta features -->
<Snippet file="snippets/callouts/beta-feature.mdx" />
```

#### Common Setup Sections

```mdx
<!-- dbt prerequisites (includes heading) -->
<Snippet file="snippets/setup/dbt-project-required.mdx" />

<!-- Support channels (includes heading) -->
<Snippet file="snippets/common/support-channels.mdx" />
```

### When to Use Snippets

- βœ… **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

### Creating New Snippets

If you notice the same content repeated across 3+ pages:

1. Create a new snippet file in `/snippets/` with an appropriate subdirectory
2. Use descriptive filenames: `enterprise-only.mdx` not `callout1.mdx`
3. Document the new snippet in this section
4. Update existing pages to use the snippet

**Example snippet file** (`snippets/callouts/my-callout.mdx`):
```mdx
<Note>
Your reusable content here. Can include [links](/path) and **formatting**.
</Note>
```

## πŸ”„ Submitting Changes

### 1. Create a Branch

```bash
git checkout -b docs/your-feature-name
```

Branch naming:
- `docs/new-feature-guide` - New documentation
- `docs/fix-typo-in-setup` - Fixes
- `docs/update-api-reference` - Updates

### 2. Make Your Changes

- Edit or create MDX files
- Add images to the correct folders
- Update `docs.json` navigation if needed

### 3. Test Locally

```bash
mintlify dev
```

- Check all links work
- Verify images display correctly
- Review formatting

### 4. Commit Your Changes

```bash
git add .
git commit -m "docs: add guide for custom metrics"
```

Commit message format:
- `docs: add [feature]` - New content
- `docs: fix [issue]` - Bug fixes
- `docs: update [page]` - Updates
- `docs: remove [deprecated content]` - Removals

### 5. Push and Create PR

```bash
git push origin docs/your-feature-name
```

Then create a Pull Request with:
- Clear title describing the change
- Description of what changed and why
- Screenshots if relevant
- Link to related issues

## πŸ“ Style Guide

### Voice and Tone

- **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"

### Formatting

#### Code Blocks

Use syntax highlighting:

```sql
SELECT
user_id,
COUNT(*) as event_count
FROM events
GROUP BY user_id
```

#### Callouts

```mdx
<Note>
Helpful tips and additional context
</Note>

<Warning>
Important warnings about potential issues
</Warning>

<Info>
Informational callouts
</Info>
```

#### Links

- Use descriptive link text: [create a new dashboard](/get-started/exploring-data/dashboards)
- Not: Click [here](/get-started/exploring-data/dashboards)

#### Lists

Use numbered lists for sequential steps:
1. First do this
2. Then do this
3. Finally do this

Use bullet points for non-sequential items:
- Feature A
- Feature B
- Feature C

### Common Terms

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)

## πŸ› Reporting Issues

Found a problem in the docs?

1. [Check if an issue already exists](https://github.com/lightdash/mintlify-docs/issues)
2. Create a new issue with:
- Clear title
- Page URL
- Description of the problem
- Suggested fix (if you have one)

## ❓ Questions?

- **Slack**: [#analytics-engineering](https://lightdash.slack.com/archives/C091T9LD2LC) (for team members)
- **GitHub Discussions**: For community questions
Loading