A community library of hooks for Pure Blog.

Submit a Hook

Have a hook you'd like to share? Submit a pull request to the Codeberg repository.

How to submit

  1. Fork the repository.
  2. Create a new markdown file in src/hooks/ — e.g. src/hooks/my-hook.md.
  3. Use the template below.
  4. 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