Reference

Guide

page.create:before

$page, $input

Example

/site/config/config.php
return [
    'hooks' => [
        'page.create:before' => function ($page, $input) {
            // your code goes here
        }
    ]
]