# Hooks

All hooks are called with an `options` object like: `hookName(options: Object)`.
Bellow is the list of options for each hook.

## Hooks by order of execution


| Name | Description | Options |
| ---- | ----------- | ------- |
| `onPipelineCreated` | Called once the pipeline has been created and before its execution. | [config](./config), [pipeline](./Pipeline) |
| `onSourcesFetched` | Called once all source plugins have been run. | [config](./config), [pipeline](./Pipeline) |
| `onSiteCreated` | Called once `Site` has been instanciated and documents tree computed. | [config](./config), [pipeline](./Pipeline), [site](./Site) |
| `onDocumentsTransformed` | Called once all documents have been transformed. | [config](./config), [pipeline](./Pipeline), [site](./Site) |
| `onDocumentsIndexed` | Called once documents indexing has been preformed by specified search engines. If no search engines are configured, this webhook <ins>won't</ins> be called. | [config](./config), [pipeline](./Pipeline), [site](./Site) |
| `onOutput` | Called once documents have been writen/output using all specified outputs plugins. | [config](./config), [pipeline](./Pipeline), [site](./Site) |
| `onDevServerListening` | Called once documents have been writen/output using all specified outputs plugins. | [config](./config), [pipeline](./Pipeline), [httpServer](./DevHttpServer), [wsServer](./WebsocketServer) |




## Usage examples



