Skip to content

Commit

Permalink
update MAINTAINERS with update_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kjaymiller committed Nov 6, 2024
1 parent cd44c5a commit d2d55f2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ First off, thank you for considering contributing to Black Python Devs website.
- [Translations](#translations)
- [Styling](#styling)
- [Adding New Pages](#adding-new-pages)
- Post Validation

# Before You Get Started

Expand Down Expand Up @@ -203,6 +204,34 @@ ROUTES = [

- Make sure your new page renders correctly and all links work as expected.

## Layout Validation

### Automatic Layout Updates

To ensure consistency across all blog posts, we've implemented automatic layout validation and updating functionality. This helps maintain proper frontmatter configuration for all Markdown files in the `_posts` directory.

### Tools and Features

#### `update_layout.py` CLI Tool

- Checks and applies missing layout fields to post files
- Can process multiple posts simultaneously
- Usage:
```bash
python update_layout.py fix|check path/to/post1.md [path/to/post2.md ...]
```

#### Pre-commit Hook

We've implemented a custom pre-commit hook that automatically runs the `update_layout.py` update check on any `.md` files in the `_posts` directory that are being committed. The hook will:

- Run automatically before each commit
- Check all modified `.md` files in the `_posts` directory
- Apply the necessary layout field if missing
- Fail the commit initially but fix the issue, allowing you to commit again

For manual layout checks and updates, you can always run the `update_layout.py` tool directly.

---

Remember, when in doubt, don't hesitate to ask for help in our Discord community or in a GitHub issue!

0 comments on commit d2d55f2

Please sign in to comment.