theme-color now changes with site theme
This commit is contained in:
parent
e35ede04c2
commit
22c42bbd5f
3 changed files with 34 additions and 23 deletions
|
@ -1,31 +1,35 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="author" content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
|
||||
<meta name="robots" content="noodp"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author"
|
||||
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
|
||||
<meta name="description"
|
||||
content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
{{ block "title" . }}
|
||||
<title>
|
||||
{{ if .IsHome }}
|
||||
{{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
|
||||
{{ else }}
|
||||
{{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
|
||||
{{ end }}
|
||||
</title>
|
||||
<title>
|
||||
{{ if .IsHome }}
|
||||
{{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
|
||||
{{ else }}
|
||||
{{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
|
||||
{{ end }}
|
||||
</title>
|
||||
{{ end }}
|
||||
|
||||
<!-- CSS -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro" rel="stylesheet" type="text/css">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.1/css/flag-icon.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro" rel="stylesheet"
|
||||
type="text/css">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.1/css/flag-icon.min.css" rel="stylesheet"
|
||||
type="text/css">
|
||||
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{- range .Site.Params.customCSS }}
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
|
@ -34,20 +38,23 @@
|
|||
{{- template "_internal/schema.html" . }}
|
||||
{{- template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||
{{ if isset .Params "date" }}<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
|
||||
{{ range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||
{{ if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ if .OutputFormats.Get "json" }}
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate"
|
||||
type="application/json" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom head tags -->
|
||||
{{- if templates.Exists "partials/extra-head.html" -}}
|
||||
{{ partial "extra-head.html" . }}
|
||||
{{- end }}
|
||||
{{ partial "extra-head.html" . }}
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue