Reference

Guide

CSS URLs

Used by the css() helper

/site/plugins/css-helper/index.php
Kirby::plugin('my/css', [
  'components' => [
    'css' => function (Kirby $kirby, string $url, $options = null): string {
      // create fingerprint for cache busting
      $fingerprint = md5_file($url);
      return $url . '?' . $fingerprint;
    }
  ]
]);

Parameters

Name Type Default Description
$kirby Kirby\Cms\App

Kirby instance

$url string

Relative or absolute URL

$options string|array null

An array of attributes for the link tag or a media attribute string

Return type

string

Source code

kirby/config/components.php#L28