Serving all files via cdn domain - Kirby loves CDN

I am currently testing the cookbook recipe “Kirby loves CDN” and so far everything is going great. Both the images and JS/CSS files are delivered via the CDN URL.

Only the favicon are still delivered via the site URL - here the routing does not work and I can’t see what the problem is.


<link rel="apple-touch-icon" sizes="180x180" href="<?= url('apple-touch-icon.png') ?>">
<?= css([ 'assets/css/app.min.css', '@auto']) ?>


<link rel="apple-touch-icon" sizes="180x180" href="https://kirby.test/apple-touch-icon.png">
<link href="" rel="stylesheet">

I use the plugin from the Kirpy repo:

Maybe someone can give me a tip on how to get the favicons delivered via the CDN URL as well?

Thanks a lot

Since the favicon is neither a file object nor in the assets folder, it is ignored by the plugin, because the plugin looks for file paths in the assets folder.

Ah ok.

But using the asset folder:

  <?= $kirby->url('assets') ?>/favicon-32x32.png

still results in



<link rel="apple-touch-icon" sizes="180x180" href="<?= url('assets/favicon-32x32.png') ?>">

(not tested)

Wonderful, that’s how it works, thank you!