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

Internal templates #27

Merged
merged 2 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 4 additions & 36 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,10 @@
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 }}"
/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

{{ 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 }}"
/>
{{ hugo.Generator }}

{{ if .Site.Params.flattr }}
<meta name="flattr:id" content="{{ .Site.Params.flattr }}" />
Expand All @@ -72,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 }}