Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
use internal templates in head.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkmngrgn committed Oct 2, 2022
1 parent e7c2ee9 commit f749a48
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 51 deletions.
12 changes: 6 additions & 6 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head" . -}}
{{ partial "head" . }}


<body>
{{- partial "header" . -}}
{{ partial "header" . }}


<div id="content">
{{- block "main" . }}{{- end }}
{{ block "main" . }}{{ end }}
</div>

{{- partial "footer" . -}}
{{- partial "footer_extra" . -}}
{{ partial "footer" . }}
{{ partial "footer_extra" . }}

{{- template "_internal/google_analytics_async.html" . -}}
{{ template "_internal/google_analytics_async.html" . }}
</body>
</html>
8 changes: 4 additions & 4 deletions layouts/partials/footer_extra.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- partial "script_bootstrap" . -}}
{{ partial "script_bootstrap" . }}

{{ if .Site.Params.highlightjs }}
{{- partial "script_highlight" . -}}
{{ partial "script_highlight" . }}
{{ end }}

{{ if .Site.Params.progressively }}
{{- partial "script_progressively" . -}}
{{ partial "script_progressively" . }}
{{ end }}

{{ if .Site.Params.uselatex }}
{{- partial "script_latex" . -}}
{{ partial "script_latex" . }}
{{ end }}
40 changes: 3 additions & 37 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,8 @@
content="{{ .Description | default .Site.Params.description }}"
/>

<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:locale" content="nn_NO" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta
property="og:title"
content="{{ if .Title }}
{{ .Title }}
{{ else }}
{{ .Site.Title }}
{{ end }}"
/>
<meta
property="og:image"
content="{{ .Site.BaseURL }}{{ .Params.meta_img | default .Site.Params.logofile }}"
/>
<meta
property="og:description"
content="{{ .Description | default .Site.Params.description }}"
/>

{{ if .Site.Params.twitter }}
<meta property="twitter:site" content="@{{ .Site.Params.twitter }}" />
{{ end }}


<meta property="twitter:title" content="{{ .Title | default .Site.Title }}" />
<meta
property="twitter:image"
content="{{ .Site.BaseURL }}{{ .Params.meta_img | default .Site.Params.logofile }}"
/>
<meta property="twitter:card" content="summary" />
<meta
property="twitter:description"
content="{{ .Description | default .Site.Params.description }}"
/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

{{ hugo.Generator }}

Expand All @@ -74,5 +40,5 @@
title="{{ .Site.Title }}"
/>

{{- partial "head_extra" . -}}
{{ partial "head_extra" . }}
</head>
8 changes: 4 additions & 4 deletions layouts/partials/head_extra.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{- partial "style_bootstrap" . -}}
{{ partial "style_bootstrap" . }}

{{- partial "style_main" . -}}
{{ partial "style_main" . }}

{{ if .Site.Params.highlightjs }}
{{- partial "style_highlight" . -}}
{{ partial "style_highlight" . }}
{{ end }}

{{ if .Site.Params.progressively }}
{{- partial "style_progressively" . -}}
{{ partial "style_progressively" . }}
{{ end }}

0 comments on commit f749a48

Please sign in to comment.