<?php

return [
	// Kirby configuration settings
	'panel' => [
		'language' => 'fr',
		'css' => 'assets/build/panel.css'
	],
	// Sitemapper plugin options
	'kirbyzone.sitemapper' => [
		'intro' => false,
		'byLine' => 'Sitemap generated with <a href="https://github.com/kirbyzone/sitemapper" target="_blank">Sitemapper by Kirbyzone</a>.'
	],
	// Hooks
	'hooks' => [
		'file.create:after' => function($file) {
			// Populate file_type field with $file->type() method after file creation
			if ($file->type()) {
				$file->update([
					'file_type' => $file->type()
				]);
			}
		},
		'kirbytext:after' => function (string $text) {
			// Replace any HTML <h1> or <h2> tag by <h3> tag after Markdown parsing
			return preg_replace(['/<h1>|<h2>/', '/<\/h1>|<\/h2>/'], ['<h3>', '</h3>'], $text);
		}
	],
	// Thumbnails and srcsets presets
	'thumbs' => [
		'srcsets' => [
			'default' => [
				'640w' => ['width' => 640, 'quality' => 80],
				'1280w' => ['width' => 1280, 'quality' => 80],
				'1920w' => ['width' => 1920, 'quality' => 80]
			]
		]
	]
];
