import favicons into all **.ily.rs sites
This commit is contained in:
parent
4699453cf6
commit
554a268369
11 changed files with 45 additions and 0 deletions
18
modules/favicons.nix
Normal file
18
modules/favicons.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
let
|
||||
faviconRoot = ../assets/favicons;
|
||||
in
|
||||
{
|
||||
services.caddy.extraConfig = ''
|
||||
(favicons) {
|
||||
@favicon path /favicon.ico /favicon.svg /favicon.png /apple-touch-icon.png /apple-touch-icon-precomposed.png
|
||||
handle @favicon {
|
||||
root * ${faviconRoot}
|
||||
@needs_png path /favicon.ico /apple-touch-icon.png /apple-touch-icon-precomposed.png
|
||||
rewrite @needs_png /favicon.png
|
||||
header Cache-Control "public, max-age=86400"
|
||||
file_server
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue