Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
06a98e2
reorganise pages
DeveloperAlly Jan 8, 2026
d594c9b
Add comprehensive on-chain dual gateway test section
DeveloperAlly Jan 8, 2026
8adba37
Pretty good. Maybe a quick monitor section. Then clean up and ship
DeveloperAlly Jan 8, 2026
04a3bf3
Ready for review
DeveloperAlly Jan 8, 2026
f0d82ed
Format Docker Quickstart
DeveloperAlly Jan 8, 2026
db6df1f
set up layouts
DeveloperAlly Jan 8, 2026
a8c787b
style
DeveloperAlly Jan 8, 2026
4794df3
code samples
DeveloperAlly Jan 10, 2026
a027618
fix styles.css error
DeveloperAlly Jan 10, 2026
1a02925
fix IA
DeveloperAlly Jan 10, 2026
77ac754
adding readme's to repo on docs features, updating layouts, correctin…
DeveloperAlly Jan 10, 2026
47b2229
change US language flag to uk language flag
DeveloperAlly Jan 10, 2026
47f9d2f
Docs v2 cursor (#737)
DeveloperAlly Jan 12, 2026
90dced9
Fixing links, pages, seo, layout, IA for public view
DeveloperAlly Jan 12, 2026
ebe131f
checkpoint commit
DeveloperAlly Jan 12, 2026
4964c2c
Add automatic SEO generation script to create keywords for all mdx fi…
DeveloperAlly Jan 12, 2026
c9fc104
update docs.json paths
DeveloperAlly Jan 12, 2026
06312be
Adding AI safety guards to repo
DeveloperAlly Jan 12, 2026
626f68f
Fix frontmatter parsing error
DeveloperAlly Jan 12, 2026
3a7f4df
revert agent changes to frontmatter
DeveloperAlly Jan 12, 2026
71b6362
new script
DeveloperAlly Jan 12, 2026
2a31ffb
Adding Callout to pages under construction still
DeveloperAlly Jan 12, 2026
ed3bd4c
change og:image
DeveloperAlly Jan 12, 2026
85744bf
add new og image
DeveloperAlly Jan 12, 2026
7840c9c
Fix og links
DeveloperAlly Jan 13, 2026
3cd2e72
re-style home page
DeveloperAlly Jan 13, 2026
b04ad87
tweak
DeveloperAlly Jan 13, 2026
9b10b13
update protocol and token tab IA
DeveloperAlly Jan 13, 2026
c25c894
update portal
DeveloperAlly Jan 13, 2026
7c699b2
update developer landing
DeveloperAlly Jan 13, 2026
65e308a
home page tweaks
DeveloperAlly Jan 13, 2026
47dd95a
frame mode many frustrating
DeveloperAlly Jan 14, 2026
005a9b8
backup hero style before AI ruins it... ;p
DeveloperAlly Jan 14, 2026
c9e8e61
backup hero style before AI ruins it... ;p
DeveloperAlly Jan 14, 2026
51ae706
Frame styled
DeveloperAlly Jan 14, 2026
6a8e561
separating Portal Components for reuse
DeveloperAlly Jan 15, 2026
acb9b70
fix theme mode colours in frame mode
DeveloperAlly Jan 16, 2026
da22fdf
fix mode
DeveloperAlly Jan 16, 2026
ad50f6e
theme aware icons
DeveloperAlly Jan 16, 2026
8337adb
Merge theme-aware icons and starfield updates from agent/theme-migration
DeveloperAlly Jan 16, 2026
e6c383f
theme aware
DeveloperAlly Jan 16, 2026
5fd8a00
style changes
DeveloperAlly Jan 16, 2026
7fa0f2d
centred
DeveloperAlly Jan 16, 2026
aeddeb7
finish styles for portals
DeveloperAlly Jan 16, 2026
4f619ea
move elements
DeveloperAlly Jan 16, 2026
08c977e
update products, portal pages
DeveloperAlly Jan 16, 2026
5eb96e0
mission control
DeveloperAlly Jan 17, 2026
f179636
products
DeveloperAlly Jan 17, 2026
ac14cbc
finished portals
DeveloperAlly Jan 17, 2026
0ca2506
read home image from github not project
DeveloperAlly Jan 17, 2026
7fd07ea
home pages
DeveloperAlly Jan 18, 2026
c1e6e7c
add images, finish story
DeveloperAlly Jan 18, 2026
c0ef6f7
style updates
DeveloperAlly Jan 18, 2026
53a0e5f
clean up
DeveloperAlly Jan 18, 2026
e2e387e
small title change
DeveloperAlly Jan 18, 2026
e4e18b4
clean up duplicate assets
DeveloperAlly Jan 18, 2026
d1af4f0
tweaks on Home Pages, adding content
DeveloperAlly Jan 18, 2026
8234de5
home tab ok to ship to preview
DeveloperAlly Jan 18, 2026
3a4eaec
change n8n fetches to github actions
DeveloperAlly Jan 19, 2026
91c35b4
add github workflows
DeveloperAlly Jan 19, 2026
373b524
update gh secret name
DeveloperAlly Jan 19, 2026
03f1e44
Update forum data - 2026-01-19T03:30:43.015-05:00
DeveloperAlly Jan 19, 2026
8bfc8d2
Update Blog Data 2026-01-19T03:35:53.410-05:00
DeveloperAlly Jan 19, 2026
fc6330a
blog workflow
DeveloperAlly Jan 19, 2026
348991f
add youtube ingest
DeveloperAlly Jan 19, 2026
3bc88ba
remove secret
DeveloperAlly Jan 19, 2026
c4fd763
remove from git
DeveloperAlly Jan 19, 2026
fbbb1c2
Update Livepeer YouTube videos - 2026-01-19T11:18:24.988Z
DeveloperAlly Jan 19, 2026
92ab39f
Update Livepeer YouTube videos - 2026-01-19T11:24:35.317Z
DeveloperAlly Jan 19, 2026
44cb743
Update Livepeer YouTube videos - 2026-01-19T11:40:42.960Z
DeveloperAlly Jan 19, 2026
d4d4087
youtube ingest
DeveloperAlly Jan 20, 2026
3e25953
manual pull
DeveloperAlly Jan 20, 2026
8449d34
finalise trending page
DeveloperAlly Jan 20, 2026
637bc09
remove tests
DeveloperAlly Jan 20, 2026
7674c70
Update forum data - 2026-01-20T14:00:14.116-05:00
DeveloperAlly Jan 20, 2026
b382233
add discord announcements automation
DeveloperAlly Jan 21, 2026
b3d55c0
chore: update Discord announcements from workflow
DeveloperAlly Jan 21, 2026
9f3a5db
commitMessage: `chore: create Discord announcements file from workflo…
DeveloperAlly Jan 21, 2026
276a84c
discord announcements integrated
DeveloperAlly Jan 21, 2026
a8d96fe
tweak
DeveloperAlly Jan 21, 2026
2428594
tweak
DeveloperAlly Jan 21, 2026
5d6044e
tweak
DeveloperAlly Jan 21, 2026
010fa59
added socials links to community
DeveloperAlly Jan 21, 2026
9fbcf58
add luma automation
DeveloperAlly Jan 21, 2026
25e8575
Rename lumaEvents.jsx to lumaEventsData.jsx
DeveloperAlly Jan 21, 2026
e9efd63
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Jan 21, 2026
104d5fb
fix luma calendar style
DeveloperAlly Jan 21, 2026
f57f0f5
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Jan 21, 2026
f81ce1f
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Jan 21, 2026
d21d4e6
clean up console.logs
DeveloperAlly Jan 21, 2026
327fe70
Update forum data - 2026-01-21T14:00:13.974-05:00
DeveloperAlly Jan 21, 2026
ae12a56
commitMessage: `chore: create Discord announcements file from workflo…
DeveloperAlly Jan 22, 2026
c8e9e5b
Update forum data - 2026-01-22T14:00:13.728-05:00
DeveloperAlly Jan 22, 2026
550af11
Update forum data - 2026-01-23T14:00:14.163-05:00
DeveloperAlly Jan 23, 2026
f92d178
updating pages
DeveloperAlly Jan 23, 2026
1a67f24
finishing Livepeer section
DeveloperAlly Jan 23, 2026
6912819
Home > Livepeer Section content
DeveloperAlly Jan 24, 2026
d88527c
update ecosystem page
DeveloperAlly Jan 24, 2026
f03fcc3
add a quote component
DeveloperAlly Jan 24, 2026
39abb81
home cleanup
DeveloperAlly Jan 24, 2026
8a8b7e4
commitMessage: `chore: create Discord announcements file from workflo…
DeveloperAlly Jan 24, 2026
95e04f2
fix discord automation
DeveloperAlly Jan 24, 2026
face906
im tired now goodnight
DeveloperAlly Jan 24, 2026
085cab9
Update forum data - 2026-01-24T14:00:41.219-05:00
DeveloperAlly Jan 24, 2026
2f08e77
Update Livepeer YouTube videos - 2026-01-25T05:00:25.250Z
DeveloperAlly Jan 25, 2026
938379f
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Jan 25, 2026
1401aeb
Update Blog Data 2026-01-25T00:00:46.631-05:00
DeveloperAlly Jan 25, 2026
a2d6876
primer
DeveloperAlly Jan 25, 2026
f1a2e06
add embody section
DeveloperAlly Jan 25, 2026
12b9806
resolve merge conflict
DeveloperAlly Jan 25, 2026
97cca96
basic embody page
DeveloperAlly Jan 25, 2026
3c782d9
products updates
DeveloperAlly Jan 25, 2026
d010c04
product IA merge
DeveloperAlly Jan 25, 2026
ab5acc9
socialscomponent, primer
DeveloperAlly Jan 25, 2026
b80cb1b
tweaks
DeveloperAlly Jan 25, 2026
f32bcdf
continuing ecosystem
DeveloperAlly Jan 25, 2026
052dd07
refining ecosystem
DeveloperAlly Jan 25, 2026
f178936
refining ecosystem
DeveloperAlly Jan 25, 2026
1106d84
split org and eco
DeveloperAlly Jan 25, 2026
e134c04
Update forum data - 2026-01-25T14:00:41.121-05:00
DeveloperAlly Jan 25, 2026
db69804
script to create a glossary, updating socials links, finalising organ…
DeveloperAlly Jan 26, 2026
6023185
finalise section
DeveloperAlly Jan 26, 2026
7a31b91
Update forum data - 2026-01-26T14:00:41.280-05:00
DeveloperAlly Jan 26, 2026
e964a7d
Update forum data - 2026-01-27T14:00:41.077-05:00
DeveloperAlly Jan 27, 2026
572fa04
primitives for showcase
DeveloperAlly Jan 28, 2026
332fab4
starting orchestrators
DeveloperAlly Jan 28, 2026
f26e954
wading through the orchestrator docs
DeveloperAlly Jan 28, 2026
c97afb1
Update forum data - 2026-01-28T14:00:42.617-05:00
DeveloperAlly Jan 28, 2026
a0daf01
gpus and protocol
DeveloperAlly Jan 29, 2026
b0e4e92
fix docs.json
DeveloperAlly Jan 29, 2026
fdb1a45
Update forum data - 2026-01-29T14:00:42.661-05:00
DeveloperAlly Jan 29, 2026
1ef535e
pools complete
DeveloperAlly Jan 30, 2026
b9269f8
orchestrator setup
DeveloperAlly Jan 30, 2026
259f30e
Update forum data - 2026-01-30T14:00:41.546-05:00
DeveloperAlly Jan 30, 2026
eb0f86c
Update forum data - 2026-01-31T14:00:46.521-05:00
DeveloperAlly Jan 31, 2026
b076c70
Update Livepeer YouTube videos - 2026-02-01T05:00:25.179Z
DeveloperAlly Feb 1, 2026
6557e86
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Feb 1, 2026
3049050
Update Blog Data 2026-02-01T00:00:46.630-05:00
DeveloperAlly Feb 1, 2026
2024d35
Update forum data - 2026-02-01T14:00:41.121-05:00
DeveloperAlly Feb 1, 2026
0d6f130
Update forum data - 2026-02-02T14:00:40.838-05:00
DeveloperAlly Feb 2, 2026
399c16e
protocol section
DeveloperAlly Feb 3, 2026
6488015
Update forum data - 2026-02-03T14:00:41.180-05:00
DeveloperAlly Feb 3, 2026
dc69e67
finishing home tab, protocol section
DeveloperAlly Feb 4, 2026
5fd28da
showcase setup
DeveloperAlly Feb 4, 2026
36125e7
Update forum data - 2026-02-04T14:00:40.899-05:00
DeveloperAlly Feb 4, 2026
192847b
Update forum data - 2026-02-05T14:00:41.086-05:00
DeveloperAlly Feb 5, 2026
0a37765
bloody time consuming styling showcase XD
DeveloperAlly Feb 6, 2026
1507052
showcase
DeveloperAlly Feb 6, 2026
a9db451
Rename nytvlive.mp4 to nytvlivepromo.mp4
DeveloperAlly Feb 6, 2026
0877269
Update forum data - 2026-02-06T14:00:41.075-05:00
DeveloperAlly Feb 6, 2026
34e3e13
Update forum data - 2026-02-07T14:00:40.814-05:00
DeveloperAlly Feb 7, 2026
ad71d86
Update Livepeer YouTube videos - 2026-02-08T05:00:25.051Z
DeveloperAlly Feb 8, 2026
4192c9e
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Feb 8, 2026
dde9bc6
Update Blog Data 2026-02-08T00:00:51.907-05:00
DeveloperAlly Feb 8, 2026
71bff7c
Update forum data - 2026-02-08T14:00:40.966-05:00
DeveloperAlly Feb 8, 2026
f395b8d
showcase looking good
DeveloperAlly Feb 6, 2026
446dca9
showcase automation
DeveloperAlly Feb 7, 2026
98af84d
showcase data validation
DeveloperAlly Feb 10, 2026
42148f5
rename
DeveloperAlly Feb 10, 2026
40b2ff2
showcase pipeline
DeveloperAlly Feb 10, 2026
1c3ef21
showcase logos
DeveloperAlly Feb 10, 2026
398cdb6
Update forum data - 2026-02-10T14:00:40.841-05:00
DeveloperAlly Feb 10, 2026
1085f85
data
DeveloperAlly Feb 11, 2026
a884924
Update showcase data from Google Sheet
DeveloperAlly Feb 11, 2026
2014e64
Update showcase data from Google Sheet
DeveloperAlly Feb 11, 2026
78e8d94
Update showcase: 1 approved projects
DeveloperAlly Feb 11, 2026
1578436
Update showcase: 1 approved projects
DeveloperAlly Feb 11, 2026
4ece830
edit component
DeveloperAlly Feb 11, 2026
1bde874
4606384596324074 mediaSrc
DeveloperAlly Feb 11, 2026
72781bc
4606384596324074 logo
DeveloperAlly Feb 11, 2026
6fd47ab
Update {{ $json.title }} MediaSrc
DeveloperAlly Feb 11, 2026
0d68686
4606384596324074 mediaSrc
DeveloperAlly Feb 11, 2026
eec0682
Update {{ $json.title }} MediaSrc
DeveloperAlly Feb 11, 2026
b324f5f
4606384596324074 mediaSrc
DeveloperAlly Feb 11, 2026
9e5aebb
4606384596324074 mediaSrc
DeveloperAlly Feb 11, 2026
515e6e4
Update {{ $json.title }} Logo
DeveloperAlly Feb 11, 2026
53ec2d0
logo
DeveloperAlly Feb 11, 2026
df95731
4606384596324074 logo
DeveloperAlly Feb 11, 2026
880d3fa
Update {{ $json.title }} Logo
DeveloperAlly Feb 11, 2026
3ac3636
Update {{ $json.title }} MediaSrc
DeveloperAlly Feb 11, 2026
91b0517
update logo: nytv.live
DeveloperAlly Feb 11, 2026
5a48ba3
Update {{ $json.title }} MediaSrc
DeveloperAlly Feb 11, 2026
a8dcee5
update media: nytv.live
DeveloperAlly Feb 11, 2026
454f045
update logo: nytv.live
DeveloperAlly Feb 11, 2026
277c38f
Update {{ $json.title }} MediaSrc
DeveloperAlly Feb 11, 2026
c1f51f8
update media: nytv.live
DeveloperAlly Feb 11, 2026
e512d95
Update showcase: 1 approved projects
DeveloperAlly Feb 11, 2026
bf15593
showcase complete
DeveloperAlly Feb 11, 2026
b954dff
update about
DeveloperAlly Feb 11, 2026
a5bb1ca
Update forum data - 2026-02-11T14:00:40.976-05:00
DeveloperAlly Feb 11, 2026
56877ac
protocol & network pages
DeveloperAlly Feb 12, 2026
0700e4f
Update forum data - 2026-02-12T14:00:40.933-05:00
DeveloperAlly Feb 12, 2026
a02523b
IA review protocol/netowrk
DeveloperAlly Feb 13, 2026
a6b8449
IA pages
DeveloperAlly Feb 13, 2026
c45ba44
updating protocol
DeveloperAlly Feb 13, 2026
002f69d
governance page
DeveloperAlly Feb 13, 2026
8d9e1da
Update forum data - 2026-02-13T14:00:40.725-05:00
DeveloperAlly Feb 13, 2026
7604bfa
governance page
DeveloperAlly Feb 14, 2026
dea52a0
governance complete
DeveloperAlly Feb 14, 2026
0d4e4e7
reorg community, job-lifecycle addition, protocol overview
DeveloperAlly Feb 14, 2026
cab2f4c
core mechanisms
DeveloperAlly Feb 14, 2026
0f22ce5
Update forum data - 2026-02-14T14:00:40.932-05:00
DeveloperAlly Feb 14, 2026
e18da75
Update Livepeer YouTube videos - 2026-02-15T05:00:24.966Z
DeveloperAlly Feb 15, 2026
d9f1ebd
`Chore: Update Livepeer events from Luma - ${new Date().toISOString()}`
DeveloperAlly Feb 15, 2026
04646e6
Update Blog Data 2026-02-15T00:00:46.621-05:00
DeveloperAlly Feb 15, 2026
7ab932e
token
DeveloperAlly Feb 15, 2026
7de387a
token comprehensive
DeveloperAlly Feb 15, 2026
1e02920
treasury info
DeveloperAlly Feb 15, 2026
97a869d
treasury complete
DeveloperAlly Feb 15, 2026
12222a0
Update forum data - 2026-02-15T14:00:41.020-05:00
DeveloperAlly Feb 15, 2026
e1c5ded
updating assets
DeveloperAlly Feb 16, 2026
4e592a1
Docs v2 preview updates from fork (#752)
DeveloperAlly Feb 16, 2026
223babc
Merge docs-v2-preview updates from fork (#753)
DeveloperAlly Feb 16, 2026
b133755
Update forum data - 2026-02-16T14:00:40.753-05:00
DeveloperAlly Feb 16, 2026
450acea
Update forum data - 2026-02-17T14:00:40.875-05:00
DeveloperAlly Feb 17, 2026
c29e804
Merge fork updates: Enhanced hooks, structure improvements, and upstr…
DeveloperAlly Feb 17, 2026
ac85951
Update README.md
DeveloperAlly Feb 17, 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
  •  
  •  
  •  
56 changes: 0 additions & 56 deletions .AI-SAFEGUARDS.md

This file was deleted.

16 changes: 0 additions & 16 deletions .ai-audit.sh

This file was deleted.

45 changes: 45 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Cursor Rules for Livepeer Documentation

## MANDATORY: Read Style Guide Before Making Changes

**BEFORE making any code, styling, or component changes, you MUST read:**
- `v2/pages/07_resources/documentation-guide/style-guide.mdx` - Production-grade styling guidelines
- `v2/pages/07_resources/documentation-guide/component-library.mdx` - Component reference

## Critical Styling Rules

1. **USE CSS Custom Properties ONLY** - Never use ThemeData or hardcode colors
- ✅ Use: `var(--accent)`, `var(--text)`, `var(--card-background)`
- ❌ Never use: `ThemeData.light.accent` or hardcoded hex colors

2. **Mintlify Gotchas** - Read the style guide for all Mintlify limitations:
- Import paths must be absolute from root
- Cannot import into component files
- JSX files cannot import other JSX files
- React hooks are global (no imports needed)

3. **Component Usage** - Always check component library before creating new components

## Repository Structure

- `v2/pages/` - Current documentation pages (MDX)
- `snippets/components/` - Custom React/JSX components
- `snippets/data/` - Reusable data files
- `style.css` - Global CSS Custom Properties for theming
- `docs.json` - Mintlify navigation configuration

## Before Making Changes

1. Read the style guide: `v2/pages/07_resources/documentation-guide/style-guide.mdx`
2. Check component library: `v2/pages/07_resources/documentation-guide/component-library.mdx`
3. Review Mintlify gotchas in style guide
4. Use existing components when possible
5. Follow CSS Custom Properties for all styling

## Documentation Standards

- Use CSS Custom Properties for all theme-aware colors
- Follow Mintlify import patterns (absolute paths from root)
- Test in both light and dark modes
- No suggestions or recommendations in production docs
- Keep production docs factual only
129 changes: 129 additions & 0 deletions .githooks/BYPASS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Pre-Commit Hook Bypass Flags

The pre-commit hook can be bypassed using environment variables. **Use these flags sparingly and only when necessary.**

## Human-Only Override Flag

### `ALLOW_WHITELIST_EDIT=1` ⚠️ HUMANS ONLY

**CRITICAL:** The `.whitelist` file is **PROTECTED** and cannot be edited by AI agents. The file contains the explicit rule: "IF YOU ARE AN AI YOU ARE ABSOLUTELY NOT ALLOWED TO EDIT THIS FILE."

**This flag is for HUMANS ONLY. AI agents must never use this flag.**

**Usage (HUMANS ONLY):**
```bash
ALLOW_WHITELIST_EDIT=1 git commit -m "Update .whitelist to add new root file"
```

**What it does:**
- Allows editing the `.whitelist` file
- Shows a warning that the flag should only be used by humans
- Still runs all other pre-commit checks

**⚠️ WARNING:** AI agents are explicitly forbidden from using this flag. Only human users may edit `.whitelist`.

## Available Flags

### `SKIP_STRUCTURE_CHECK=1`
Bypasses structure validation checks:
- Root directory whitelist enforcement
- Snippets directory structure checks
- v1/ frozen directory protection

**Usage:**
```bash
SKIP_STRUCTURE_CHECK=1 git commit -m "Emergency fix"
```

### `SKIP_STYLE_CHECK=1`
Bypasses style guide compliance checks:
- ThemeData usage checks
- Hardcoded color checks
- Relative import checks
- React/Mintlify import checks

**Usage:**
```bash
SKIP_STYLE_CHECK=1 git commit -m "Temporary style change"
```

### `SKIP_VERIFICATION=1`
Bypasses verification scripts:
- MDX syntax validation
- JSON syntax validation
- Shell script validation
- JavaScript/JSX validation
- Mintlify configuration checks
- Import path validation

**Usage:**
```bash
SKIP_VERIFICATION=1 git commit -m "Skip verification"
```

### `SKIP_TESTS=1`
Bypasses test suite execution:
- Unit tests
- Integration tests
- Browser tests

**Usage:**
```bash
SKIP_TESTS=1 git commit -m "Skip tests"
```

### `SKIP_ALL=1`
Bypasses ALL checks. **Use with extreme caution!**

**Usage:**
```bash
SKIP_ALL=1 git commit -m "Emergency commit - all checks bypassed"
```

## When to Use Bypass Flags

### ✅ Acceptable Use Cases:
- **Emergency hotfixes** - Critical production issues
- **WIP commits** - Work in progress that will be fixed before merge
- **Temporary debugging** - Adding debug code that will be removed
- **Migration work** - During active migration when structure is intentionally changing

### ❌ NOT Acceptable:
- **Regular commits** - Normal development should pass all checks
- **Permanent bypass** - Don't make bypassing a habit
- **Skipping to avoid fixing issues** - Fix the issues instead

## Best Practices

1. **Fix issues instead of bypassing** - Bypass flags are for emergencies, not convenience
2. **Document why** - If you must bypass, explain why in the commit message
3. **Follow up** - If you bypassed checks, fix the issues in a follow-up commit
4. **Review carefully** - If bypassing, manually verify your changes are correct

## Examples

### Emergency Hotfix
```bash
SKIP_ALL=1 git commit -m "HOTFIX: Critical security patch - bypassing checks for speed"
```

### WIP Commit
```bash
SKIP_STYLE_CHECK=1 git commit -m "WIP: Adding feature - will fix style issues before merge"
```

### Migration Work
```bash
SKIP_STRUCTURE_CHECK=1 git commit -m "Migration: Moving files - structure intentionally changing"
```

## Warning

Bypassing pre-commit hooks can lead to:
- Broken builds
- Style violations
- Structure violations
- Broken pages
- Merge conflicts

**Always verify your changes work correctly after bypassing checks.**
95 changes: 95 additions & 0 deletions .githooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Git Hooks - Quick Reference

This directory contains git hooks for enforcing repository standards.

**📖 Full Documentation:** See [docs/CONTRIBUTING/GIT-HOOKS.md](../../docs/CONTRIBUTING/GIT-HOOKS.md)

## Quick Start

```bash
# Install hooks
./.githooks/install.sh
```

## Pre-commit Hook

The pre-commit hook enforces style guide compliance and runs verification scripts:

### Style Guide Checks

- ❌ **ThemeData usage** - Blocks deprecated ThemeData imports
- ❌ **Hardcoded colors** - Warns about hardcoded hex colors that should use CSS variables
- ⚠️ **Relative imports** - Warns about relative imports (should use absolute paths)
- ⚠️ **@mintlify/components imports** - Warns about unnecessary imports (components are global)
- ⚠️ **React hook imports** - Warns about unnecessary React imports (hooks are global)

### Verification Scripts

The hook also runs `.githooks/verify.sh` which checks:

- ✅ **MDX syntax** - Validates frontmatter and basic MDX structure
- ✅ **JSON syntax** - Validates JSON files are parseable
- ✅ **Shell script syntax** - Validates shell scripts with `bash -n`
- ✅ **JavaScript syntax** - Validates JS files with `node --check`
- ✅ **Mintlify config** - Validates docs.json/mint.json syntax
- ✅ **Import paths** - Ensures snippets imports use absolute paths
- ✅ **Browser validation** - Tests MDX files in headless browser (requires `mint dev` running)

## Installation

To install the pre-commit hook:

```bash
cp .githooks/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```

Or use the install script:

```bash
./.githooks/install.sh
```

## Manual Installation

If the install script doesn't work:

```bash
# Copy the hook
cp .githooks/pre-commit .git/hooks/pre-commit

# Make it executable
chmod +x .git/hooks/pre-commit

# Verify it's installed
ls -la .git/hooks/pre-commit
```

## Testing

Test the hook by staging a file with a violation:

```bash
# Create a test file with ThemeData (should fail)
echo 'import { ThemeData } from "/snippets/styles/themeStyles.jsx";' > test-violation.jsx
git add test-violation.jsx
git commit -m "test" # Should be blocked

# Clean up
rm test-violation.jsx
git reset HEAD test-violation.jsx
```

## Bypassing (Not Recommended)

If you absolutely must bypass the hook (not recommended):

```bash
git commit --no-verify -m "message"
```

**Warning:** Only bypass if you have a legitimate reason and understand the style guide violations.

## Style Guide Reference

See: `v2/pages/07_resources/documentation-guide/style-guide.mdx`
32 changes: 32 additions & 0 deletions .githooks/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Install git hooks

HOOKS_DIR=".git/hooks"
SOURCE_DIR=".githooks"

if [ ! -d "$HOOKS_DIR" ]; then
echo "Error: .git/hooks directory not found. Are you in the repository root?"
exit 1
fi

if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: .githooks directory not found. Are you in the repository root?"
exit 1
fi

echo "Installing git hooks..."

# Install pre-commit hook
if [ -f "$SOURCE_DIR/pre-commit" ]; then
cp "$SOURCE_DIR/pre-commit" "$HOOKS_DIR/pre-commit"
chmod +x "$HOOKS_DIR/pre-commit"
echo "✓ Installed pre-commit hook"
else
echo "✗ pre-commit hook not found in $SOURCE_DIR"
fi

echo ""
echo "Git hooks installed successfully!"
echo ""
echo "The pre-commit hook will now check for style guide violations."
echo "See .githooks/README.md for details."
Loading
Loading