mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-22 11:30:21 +00:00
theme: custom.css not written to public #1033
This commit is contained in:
parent
a8d787c37e
commit
713531ec7d
2 changed files with 17 additions and 5 deletions
|
@ -1,8 +1,20 @@
|
||||||
<!-- compat way of adding custom scripts in old Hugo documentation -->
|
<!-- compat way of adding custom scripts in old Hugo documentation -->
|
||||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||||
{{- if or (fileExists "static/css/custom.css") (fileExists "assets/css/custom.css") }}
|
|
||||||
<link href="{{"css/custom.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
|
{{- $filePath := "css/custom.css" }}
|
||||||
|
{{- with (resources.Get (printf "/%s" $filePath)) }}
|
||||||
|
<link href="{{ .RelPermalink }}{{ $assetBusting }}" rel="stylesheet">
|
||||||
|
{{- else }}
|
||||||
|
{{- if (fileExists (printf "/static/%s" $filePath)) }}
|
||||||
|
<link href="{{ printf "%s" $filePath | relURL }}{{ $assetBusting }}" rel="stylesheet">
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or (fileExists "static/js/custom.js") (fileExists "assets/js/custom.js") }}
|
|
||||||
<script src="{{"js/custom.js" | relURL}}{{ $assetBusting }}" defer></script>
|
{{- $filePath := "js/custom.js" }}
|
||||||
|
{{- with (resources.Get (printf "/%s" $filePath)) }}
|
||||||
|
<script src="{{ .RelPermalink }}{{ $assetBusting }}" defer></script>
|
||||||
|
{{- else }}
|
||||||
|
{{- if (fileExists (printf "/static/%s" $filePath)) }}
|
||||||
|
<script src="{{ printf "%s" $filePath | relURL }}{{ $assetBusting }}" defer></script>
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1 +1 @@
|
||||||
7.4.0+942fa83318bb9ac25455cbaae8ab764f90507bfb
|
7.4.0+a8d787c37e4fd3e417f868b5124b6820a944b170
|
Loading…
Add table
Reference in a new issue