forked from sr2/hugo-sr2
Add more meta data and move scripts to site
Makes it easy to add custom scripts by overriding _partials/scripts.html
This commit is contained in:
parent
1c9895212e
commit
938f5efabd
2 changed files with 20 additions and 22 deletions
|
|
@ -9,31 +9,27 @@
|
||||||
</title>
|
</title>
|
||||||
{{ partialCached "head/css.html" . }}
|
{{ partialCached "head/css.html" . }}
|
||||||
{{ partialCached "head/js.html" . }}
|
{{ partialCached "head/js.html" . }}
|
||||||
|
{{ partial "head/scripts.html" . }}
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap"
|
||||||
rel="stylesheet" />
|
rel="stylesheet" />
|
||||||
{{ if not .IsHome }}
|
|
||||||
<meta property="og:title" content="{{ .Title }}" />
|
<!-- Meta data-->
|
||||||
<meta property="og:url" content="{{ .RelPermalink }}" />
|
{{- if .Description }}
|
||||||
|
<meta name="description" content="{{ .Description }}" />
|
||||||
<meta property="og:description" content="{{ .Description }}" />
|
<meta property="og:description" content="{{ .Description }}" />
|
||||||
<meta property="og:type" content="website" />
|
{{- end }}
|
||||||
{{ end }}
|
{{- if .Params.MetaKeywords }}
|
||||||
{{ if eq .Name "Contact" }}
|
<meta name="kaywords" content="{{ .Params.MetaKeywords }}" />
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
{{- end }}
|
||||||
<script
|
{{- if .Params.MetaAuthor }}
|
||||||
id="zammad_form_script"
|
<meta name="author" content="{{ .Params.MetaAuthor }}" />
|
||||||
src="https://help.sr2.uk/assets/form/form.js"></script>
|
{{- end }}
|
||||||
<script>
|
<meta name="robots" content="index, follow" />
|
||||||
$(function () {
|
<meta name="language" content="{{ (page.Language.LanguageCode | default (site.LanguageCode | default "en")) }}" />
|
||||||
$("#zammad-feedback-form").ZammadForm({
|
<meta property="og:title" content="{{ .Title }}" />
|
||||||
agreementMessage: {{ site.Params.feedback.agreementMessage }},
|
<meta property="og:url" content="{{ .RelPermalink }}" />
|
||||||
messageSubmit:{{ site.Params.feedback.messageSubmit }},
|
<meta property="og:type" content="website" />
|
||||||
messageThankYou:{{ site.Params.feedback.messageThankYou }},
|
|
||||||
showTitle: false,
|
|
||||||
noCSS: true,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
|
||||||
2
layouts/_partials/head/scripts.html
Normal file
2
layouts/_partials/head/scripts.html
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
<!-- Use this file to add additional scripts you might need -->
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue