Skip to content

Commit

Permalink
Move head to baseof
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Oct 2, 2024
1 parent 58211c5 commit 6cf7979
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 29 deletions.
24 changes: 23 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,29 @@
<!DOCTYPE html>
<html{{ with site.LanguageCode }} lang="{{ . }}"{{ end }}>
<head>
{{ partial "head.html" . -}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src 'self'; style-src 'self'; script-src 'self' 'wasm-unsafe-eval'; img-src 'self' data:; connect-src 'self' {{ .Site.Params.API_PATH }}; form-action 'none'">
<meta name="keywords" content="{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}">
<meta name="description" content="{{ if or .IsPage .IsSection }}{{ .Summary }}{{ else }}{{ site.Params.description }}{{ end }}">
<meta name="theme-color" content="#091b33">
{{- if .Params.noindex }}
<meta name="robots" content="noindex">
{{- end }}

{{ template "_internal/opengraph.html" . -}}
{{ template "_internal/twitter_cards.html" . -}}

{{- $svg := resources.Get "svg/favicon.svg" | minify | fingerprint }}
<link rel="icon" href="{{ $svg.RelPermalink }}">
{{- $css := resources.Get "css/style.scss" | toCSS (dict "outputStyle" "compressed") | minify | fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{- with .OutputFormats.Get "rss" }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}" />
{{- end }}
{{- $js := resources.Get "js/color-mode-switcher.js" | js.Build (dict "minify" hugo.IsProduction) | fingerprint }}
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>

<title>{{ block "title" . }}{{ .Page.Title }} - {{ .Site.Title }}{{ end }}</title>
</head>

Expand Down
28 changes: 0 additions & 28 deletions layouts/partials/head.html

This file was deleted.

0 comments on commit 6cf7979

Please sign in to comment.