👷 Finish default base index page head attribute migrate.
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
{{- $scss := resources.Get "css/main.scss" }}
|
||||
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
|
||||
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
||||
{{- partial "head/meta" . }}
|
||||
{{- partial "head/style" . }}
|
||||
48
layouts/partials/head/meta.html
Normal file
48
layouts/partials/head/meta.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{- if .P.darkmode }}
|
||||
<meta name="theme-color" content="{{ .P.themeColor.dark }}" media="(prefers-color-scheme: dark)">
|
||||
{{- else }}
|
||||
<meta name="theme-color" content="{{ .P.themeColor.light }}" media="(prefers-color-scheme: light)">
|
||||
{{- end }}
|
||||
{{- if .P.googleSiteVerification }}
|
||||
<meta name="google-site-verification" content="{{ .P.googleSiteVerification }}">
|
||||
{{- end }}
|
||||
{{- with .P.bingSiteVerification }}
|
||||
<meta name="msvalidate.01" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- with .P.yandexSiteVerification }}
|
||||
<meta name="yandex-verification" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- with .P.baiduSiteVerification }}
|
||||
<meta name="baidu-site-verification" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- $lang := .Scratch.Get "lang" }}
|
||||
{{- $P := .P }}
|
||||
{{- $Page := .Page }}
|
||||
{{- with $P.openGraph }}
|
||||
{{- if .enable }}
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $Page.Title }}">
|
||||
<meta property="og:description" content="{{ default $P.description $Page.Description }}">
|
||||
<meta property="og:image" content="{{ $P.customLogo.url }}">
|
||||
<meta property="og:url" content="{{ $Page.Permalink }}">
|
||||
<meta property="og:site_name" content="{{ default $Page.Title $Page.Site.Title }}">
|
||||
<meta property="og:locale" content="{{ $lang }}">
|
||||
<meta property="article:author" content="{{ default $P.author $Page.Params.Author }}">
|
||||
{{- with .twitter }}
|
||||
{{- range $attr, $val := . }}
|
||||
<meta name="twitter:{{ $attr }}" content="{{ $val }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .googlePlus }}
|
||||
<link rel="publisher" href=" {{ . }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with .facebook }}
|
||||
{{- range $attr, $val := . }}
|
||||
<meta property="fb:{{ $attr }}" content="{{ $val }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
7
layouts/partials/head/style.html
Normal file
7
layouts/partials/head/style.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css">
|
||||
{{- $scss := resources.Get "css/main.scss" }}
|
||||
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
|
||||
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
||||
<link rel="stylesheet" href="/css/hover.css">
|
||||
Reference in New Issue
Block a user