fix: use .RelPermalink to include CSS

This commit is contained in:
Jimmy Cai 2020-09-20 11:33:32 +02:00
parent 3a003eadca
commit 0bcfb160f1
No known key found for this signature in database
GPG key ID: 3EA408E527F37B18
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{{- $light := resources.Get "css/highlight/light.css" | minify -}}
{{- $dark := resources.Get "css/highlight/dark.css" | minify -}}
<link rel="stylesheet" href="{{ $light.Permalink }}" media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ $dark.Permalink }}" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="{{ $light.RelPermalink }}" media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ $dark.RelPermalink }}" media="(prefers-color-scheme: dark)">

View file

@ -1,3 +1,3 @@
{{ $sass := resources.Get "scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<link rel="stylesheet" href="{{ $style.RelPermalink }}">