Submit a Hook
Have a hook you'd like to share? Submit a pull request to the Codeberg repository.
How to submit
- Fork the repository.
- Create a new markdown file in
src/hooks/— e.g.src/hooks/my-hook.md. - Use the template below.
- Submit the pull request.
File template
---
title: Your Hook Name
description: A short description of what this hook does.
author: Your Name
author_url: https://yoursite.com
hooks:
- on_post_published
- on_post_updated
---
A brief explanation of what the hook does and any setup required (API keys, config etc.).
```php
function on_post_published(string $slug): void
{
// your code here
}
```
Guidelines
- One hook file per submission.
- Keep the description to a single sentence.
- List all hook functions used in the
hooksfrontmatter field. - Note any external dependencies or required configuration.
- Once a hook has been submitted it needs to be tested, so may be a few days before it's merged.