Only search favicon and css in assets.
This commit is contained in:
parent
e2f81533c9
commit
fee2c6c7b6
@ -40,7 +40,9 @@ the link:{uri-archive}[archive] into `themes/nocolor`.
|
||||
== Configuration & Modification
|
||||
|
||||
Please take a look at the link:{uri-slick-example}[configuration example for
|
||||
Slick]. It is valid for nocolor too.
|
||||
Slick]. It is valid for nocolor too, with these exceptions:
|
||||
|
||||
* `favicon` and `css` have to be in in the assets folder.
|
||||
|
||||
You can add things to the end of the `<head>` section by overwriting the partial
|
||||
template `extra-head.html` or above the footer by overwriting
|
||||
|
@ -21,21 +21,16 @@
|
||||
{{- end }}
|
||||
{{- with .Site.Params.favicon | default "favicon.ico" }}
|
||||
{{- if resources.Get . }}
|
||||
{{- $favicon := resources.Get . | resources.Fingerprint }}
|
||||
{{- $favicon := resources.Get . }}
|
||||
<link rel="shortcut icon" href="{{ $favicon.RelPermalink }}" type="{{ $favicon.MediaType }}" />
|
||||
{{- else if fileExists (path.Join "static" .) }}
|
||||
{{- $favtype := cond (eq (path.Ext .) ".png") "image/png" "image/x-icon" }}
|
||||
<link rel="shortcut icon" href="{{ $.Site.BaseURL }}{{ . }}" type="{{ $favtype }}" />
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $style := resources.Get "nocolor.css" }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||
{{- with .Site.Params.css }}
|
||||
{{- if resources.Get . }}
|
||||
{{- $styleCustom := resources.Get . | resources.Fingerprint }}
|
||||
{{- $styleCustom := resources.Get . }}
|
||||
<link rel="stylesheet" href="{{ $styleCustom.RelPermalink }}" />
|
||||
{{- else if fileExists (path.Join "static" .) }}
|
||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}" />
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ partial "extra_head.html" . }}
|
||||
|
Reference in New Issue
Block a user