mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 08:21:53 +02:00
modify <title> in partials/head.html
This commit is contained in:
parent
4cb3111bf2
commit
4bbe55f555
1 changed files with 26 additions and 65 deletions
|
@ -5,14 +5,16 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
{{/* Title */}}
|
|
||||||
|
{{/* Title logic */}}
|
||||||
{{ if .IsHome -}}
|
{{ if .IsHome -}}
|
||||||
<title>{{ .Site.Title | emojify }}</title>
|
<title>Merox - IT Blog & Docs</title>
|
||||||
<meta name="title" content="{{ .Site.Title | emojify }}" />
|
<meta name="title" content="Merox - IT Blog & Docs" />
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<title>{{ .Title | emojify }} · {{ .Site.Title | emojify }}</title>
|
<title>{{ .Title | emojify }} · Merox</title>
|
||||||
<meta name="title" content="{{ .Title | emojify }} · {{ .Site.Title | emojify }}" />
|
<meta name="title" content="{{ .Title | emojify }} · Merox" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/* Metadata */}}
|
{{/* Metadata */}}
|
||||||
{{ with (.Params.Summary | default .Params.Description) | default .Site.Params.description -}}
|
{{ with (.Params.Summary | default .Params.Description) | default .Site.Params.description -}}
|
||||||
<meta name="description" content="{{ . }}" />
|
<meta name="description" content="{{ . }}" />
|
||||||
|
@ -27,11 +29,7 @@
|
||||||
<meta name="robots" content="{{ . }}" />
|
<meta name="robots" content="{{ . }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{ range .AlternativeOutputFormats -}}
|
|
||||||
{{ printf `
|
|
||||||
<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) |
|
|
||||||
safeHTML }}
|
|
||||||
{{ end -}}
|
|
||||||
{{/* Asset bundles */}}
|
{{/* Asset bundles */}}
|
||||||
{{ $assets := newScratch }}
|
{{ $assets := newScratch }}
|
||||||
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "blowfish")) }}
|
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "blowfish")) }}
|
||||||
|
@ -49,10 +47,13 @@
|
||||||
"sha512" }}
|
"sha512" }}
|
||||||
<link type="text/css" rel="stylesheet" href="{{ $bundleCSS.RelPermalink }}"
|
<link type="text/css" rel="stylesheet" href="{{ $bundleCSS.RelPermalink }}"
|
||||||
integrity="{{ $bundleCSS.Data.Integrity }}" />
|
integrity="{{ $bundleCSS.Data.Integrity }}" />
|
||||||
|
|
||||||
|
{{/* JavaScript Files */}}
|
||||||
{{ $jsAppearance := resources.Get "js/appearance.js" }}
|
{{ $jsAppearance := resources.Get "js/appearance.js" }}
|
||||||
{{ $jsAppearance = $jsAppearance | resources.ExecuteAsTemplate "js/appearance.js" . | resources.Minify | resources.Fingerprint "sha512" }}
|
{{ $jsAppearance = $jsAppearance | resources.ExecuteAsTemplate "js/appearance.js" . | resources.Minify | resources.Fingerprint "sha512" }}
|
||||||
<script type="text/javascript" src="{{ $jsAppearance.RelPermalink }}"
|
<script type="text/javascript" src="{{ $jsAppearance.RelPermalink }}"
|
||||||
integrity="{{ $jsAppearance.Data.Integrity }}"></script>
|
integrity="{{ $jsAppearance.Data.Integrity }}"></script>
|
||||||
|
|
||||||
{{ if .Site.Params.enableSearch | default false }}
|
{{ if .Site.Params.enableSearch | default false }}
|
||||||
{{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
|
{{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
|
||||||
{{ $jsSearch := resources.Get "js/search.js" }}
|
{{ $jsSearch := resources.Get "js/search.js" }}
|
||||||
|
@ -72,14 +73,15 @@
|
||||||
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
|
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
|
||||||
"sha512" }}
|
"sha512" }}
|
||||||
<script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}"
|
<script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}"
|
||||||
integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n " code.copy" }}" data-copied="{{ i18n " code.copied"
|
integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied" }}"></script>
|
||||||
}}"></script>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not .Site.Params.disableImageZoom | default true }}
|
{{ if not .Site.Params.disableImageZoom | default true }}
|
||||||
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }}
|
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }}
|
||||||
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
|
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Icons */}}
|
|
||||||
|
{{/* Icons and other metadata */}}
|
||||||
{{ if templates.Exists "partials/favicons.html" }}
|
{{ if templates.Exists "partials/favicons.html" }}
|
||||||
{{ partialCached "favicons.html" .Site }}
|
{{ partialCached "favicons.html" .Site }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -88,65 +90,24 @@
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
||||||
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Site Verification */}}
|
|
||||||
{{ with .Site.Params.verification.google }}
|
{{/* Social metadata */}}
|
||||||
<meta name="google-site-verification" content="{{ . }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.verification.bing }}
|
|
||||||
<meta name="msvalidate.01" content="{{ . }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.verification.pinterest }}
|
|
||||||
<meta name="p:domain_verify" content="{{ . }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.verification.yandex }}
|
|
||||||
<meta name="yandex-verification" content="{{ . }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{/* Social */}}
|
|
||||||
{{ template "_internal/opengraph.html" . }}
|
{{ template "_internal/opengraph.html" . }}
|
||||||
{{ template "_internal/twitter_cards.html" . }}
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
{{/* Schema */}}
|
|
||||||
|
{{/* Schema and author information */}}
|
||||||
{{ partial "schema.html" . }}
|
{{ partial "schema.html" . }}
|
||||||
{{/* Me */}}
|
|
||||||
{{ with .Site.Params.Author.name }}
|
{{ with .Site.Params.Author.name }}
|
||||||
<meta name="author" content="{{ . }}" />{{ end }}
|
<meta name="author" content="{{ . }}" />
|
||||||
|
{{ end }}
|
||||||
{{ with .Site.Params.Author.links }}
|
{{ with .Site.Params.Author.links }}
|
||||||
{{ range $links := . }}
|
{{ range $links := . }}
|
||||||
{{ range $name, $url := $links }}
|
{{ range $name, $url := $links }}
|
||||||
<link href="{{ $url }}" rel="me" />{{ end }}
|
<link href="{{ $url }}" rel="me" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Vendor */}}
|
{{ end }}
|
||||||
{{ partial "vendor.html" . }}
|
|
||||||
{{/* Analytics */}}
|
{{/* Google Analytics */}}
|
||||||
{{ partial "analytics/main.html" .Site }}
|
{{ partial "analytics/main.html" .Site }}
|
||||||
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
|
|
||||||
{{ if templates.Exists "partials/extend-head.html" }}
|
|
||||||
{{ partialCached "extend-head.html" .Site }}
|
|
||||||
{{ end }}
|
|
||||||
<meta name="theme-color"/>
|
|
||||||
{{/* Firebase */}}
|
|
||||||
{{ with $.Site.Params.firebase }}
|
|
||||||
{{ if isset $.Site.Params "firebase" }}
|
|
||||||
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
|
|
||||||
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
|
|
||||||
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
const firebaseConfig = {
|
|
||||||
apiKey: {{ $.Site.Params.firebase.apiKey }},
|
|
||||||
authDomain: {{ $.Site.Params.firebase.apiKey }},
|
|
||||||
projectId: {{ $.Site.Params.firebase.projectId }},
|
|
||||||
storageBucket: {{ $.Site.Params.firebase.storageBucket }},
|
|
||||||
messagingSenderId: {{ $.Site.Params.firebase.messagingSenderId }},
|
|
||||||
appId: {{ $.Site.Params.firebase.appId }},
|
|
||||||
measurementId: {{ $.Site.Params.firebase.measurementId }}
|
|
||||||
};
|
|
||||||
|
|
||||||
var app = firebase.initializeApp(firebaseConfig);
|
|
||||||
var db = firebase.firestore();
|
|
||||||
var auth = firebase.auth();
|
|
||||||
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</head>
|
</head>
|
Loading…
Add table
Reference in a new issue