1
0
Fork 0
web-jbeyerstedt/site/config/config.php

94 lines
3.1 KiB
PHP

<?php
if(!function_exists('panel')) {
header("Content-Security-Policy: default-src 'self'; style-src 'self' 'nonce-nRfqpuKWNuYyUAFPTr6WVNZk9' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; frame-src https://www.youtube-nocookie.com; script-src 'self' 'unsafe-eval' 'nonce-nRfqpuKWNuYyUAFPTr6WVNZk9' 'unsafe-inline' https://jannikb.aquila.uberspace.de/piwik/; img-src 'self' data: https://jannikb.aquila.uberspace.de/piwik/");
}
//header("X-Content-Type-Options: nosniff"); // enabled at server-side
//header("X-Frame-Options: deny"); // enabled at server-side
//header("X-Xss-Protection: 1; mode=block"); // enabled at server-side
header("Strict-Transport-Security: max-age=31536000");
header("Referrer-Policy: no-referrer");
/*
License Setup
*/
c::set('license', 'K2-PRO-153c9c6accc73d9547e255a0daba8911');
/*
Kirby Configuration
*/
c::set('cache', true);
c::set('cache.ignore', array('sitemap', 'blog'));
c::set('smartypants', true);
c::set('smartypants.attr', 2); // -- for en-dash, --- for em-dash
c::set('smartypants.doublequote.open', '&bdquo;');
c::set('smartypants.doublequote.close', '&ldquo;');
c::set('ssl', true);
/*
Modules Configuration
*/
// plg-carousel
c::set('plg_carousel.enable', true);
c::set('plg_carousel.sort', 'sort'); // sortBy parameter: sort, title, etc.
c::set('plg_carousel.dir', 'asc'); // sortBy direction: asc, desc
// plg-masonry
c::set('plg_masonry.enable', true);
c::set('plg_masonry.width', 155);
c::set('plg_masonry.quality', 75);
c::set('plg_masonry.class', 'rounded');
//c::set('plg_masonry.sizelimit', 1300); // limit the source image size (long edge)
c::set('plg_masonry.sort', 'sort'); // sortBy parameter: sort, title, etc.
c::set('plg_masonry.dir', 'asc'); // sortBy direction: asc, desc
c::set('plg_masonry.lightbox', 'swipebox');
// bastians columns.php plugin from https://github.com/getkirby/plugins/tree/master/columns
//c::set('columns.container', 'row');
//c::set('columns.item', 'col-sm-6 columns');
// enhanced sitemap by Jannik Beyerstedt:
c::set('smap_ignoreSite', array('sitemap', 'error', 'home', 'qr', 'secret', 'test'));
c::set('smap_ignoreTemplate', array('carousel', 'redirect'));
c::set('smap_showHiddenPagesAtRootLevel', true);
c::set('smap_heading_visible', 'Hauptmenü');
c::set('smap_heading_invisible', 'weitere Seiten');
//c::set('smap_column_class_id', 'class="foo" id="bar"');
/*
Piwik Plugin configuration
*/
c::set('spicy.piwik.active', false); /* cookie notice needed! */
c::set('spicy.piwik.url', 'https://jannikb.aquila.uberspace.de/piwik');
c::set('spicy.piwik.id', 2);
/*
Routes
*/
c::set('routes', array(
array(
'pattern' => 'sitemap.xml',
'action' => function() {
return site()->visit('sitemap');
}
),
// redirect legacy urls:
// feature/webdesign -> webdesign
// feature/fotografie -> fotografie
// feature/fotografie/(:any) -> fotografie/(:any)
array(
'pattern' => 'feature/(:all)',
'action' => function($uid) {
if (site()->find($uid)) {
$target = site()->find($uid)->url();
header::redirect($target, 301);
}else {
go('error');
}
}
)
));