Support params.css.

This commit is contained in:
tastytea 2019-11-26 21:54:04 +01:00
parent 601a4d5864
commit fbae23fd21
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 9 additions and 1 deletions

View File

@ -16,7 +16,15 @@
{{- $favicon := .Site.Params.favicon | default "favicon.ico" }}
{{- $favtype := cond (eq (path.Ext $favicon) ".png") "image/png" "image/x-icon" }}
<link rel="shortcut icon" href="{{ .Site.BaseURL }}{{ $favicon }}" type="{{ $favtype }}" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/style.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/nocolor.css" />
{{- with .Site.Params.css }}
{{- if resources.Get . }}
{{- $styleCustom := resources.Get . | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styleCustom.RelPermalink }}" />
{{- else if fileExists (path.Join "static" .) }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}" />
{{- end }}
{{- end }}
{{ partial "extra_head.html" . }}
</head>
<body>