Einbinden von CustomCSS setzt keine Site-Base mehr davor + kleinere Anpassungen um Leerzeilen zu vermeiden
This commit is contained in:
parent
c14beceef6
commit
631c22e7c6
18 changed files with 134 additions and 146 deletions
|
@ -3,26 +3,24 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, intial-scale=1">
|
||||
<meta name="author" content="{{ .Site.Params.Author }}">
|
||||
{{ $title := print .Site.Title " | " .Title }}
|
||||
{{- $title := print .Site.Title " | " .Title -}}
|
||||
{{ if .IsHome }}{{ $title := .Site.Title }} {{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
|
||||
{{/* compressed soll besser sein als minify bei SASS */}}
|
||||
{{ $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") }}
|
||||
{{ $sassStyle := resources.Get "_own/sass/main.scss" | resources.ToCSS $sassOptions | minify }}
|
||||
{{- $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") -}}
|
||||
{{- $sassStyle := resources.Get "_own/sass/main.scss" | resources.ToCSS $sassOptions | minify -}}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $sassStyle.RelPermalink | relURL }}">
|
||||
|
||||
{{ $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify }}{{/* .Resources.GetMatch "css/**.css" */}}
|
||||
{{- $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify -}}{{/* .Resources.GetMatch "css/**.css" */}}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink | relURL }}">
|
||||
|
||||
{{ if isset .Site.Params "custom_css" }}
|
||||
{{- if isset .Site.Params "custom_css" -}}
|
||||
{{ range .Site.Params.custom_css }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $.Site.BaseURL }}{{ . }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type (.Permalink | relURL) $.Site.Title | safeHTML }}
|
||||
{{ end }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ . | relURL }}">
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type (.Permalink | relURL) $.Site.Title | safeHTML }}
|
||||
{{- end }}
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue