diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 56 | ||||
-rw-r--r-- | layouts/partials/custom_head.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 3 | ||||
-rw-r--r-- | layouts/partials/header.html | 6 | ||||
-rw-r--r-- | layouts/partials/nav.html | 22 | ||||
-rw-r--r-- | layouts/partials/seo_tags.html | 22 | ||||
-rw-r--r-- | layouts/partials/social_card.html | 136 |
7 files changed, 0 insertions, 247 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 2525d2e..0000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}"> - -<head> - <meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" /> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - {{- partial "favicon.html" . -}} - <title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title> - - {{- partial "seo_tags.html" . -}} - <meta name="referrer" content="no-referrer-when-downgrade" /> - - {{ $style := print (default "original" .Site.Params.themeStyle) ".css" | resources.Get | minify }} - <link href="{{ $style.RelPermalink }}" rel="stylesheet"> - - {{ if (.Page.Store.Get "hasCodeBlock") }} - {{ $syntax := resources.Get "syntax.css" | minify }} - <link href="{{ $syntax.RelPermalink }}" rel="stylesheet"> - {{ end }} - - {{ with .Params.style }} - {{ $extra := resources.Get . | minify }} - <link href="{{ $extra.RelPermalink }}" rel="stylesheet"> - {{ end }} - - {{ with .OutputFormats.Get "rss" -}} - {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} - {{ end -}} - - <!-- A partial to be overwritten by the user. - Simply place a custom_head.html into - your local /layouts/partials-directory --> - {{- partial "custom_head.html" . -}} -</head> - -<body> - <header> - {{- partial "header.html" . -}} - </header> - <main id="main-content"> - {{- block "main" . }}{{- end }} - </main> - <footer> - {{- partial "footer.html" . -}} - </footer> - - <!-- A partial to be overwritten by the user. - Simply place a custom_body.html into - your local /layouts/partials-directory --> - {{- partial "custom_body.html" . -}} - <!-- {{ $analyticsJS := resources.Get "js/analytics.js" | resources.Minify }} - <script type="module" src="{{ $analyticsJS.RelPermalink }}"></script> --> -</body> - -</html> diff --git a/layouts/partials/custom_head.html b/layouts/partials/custom_head.html deleted file mode 100644 index 1a0313a..0000000 --- a/layouts/partials/custom_head.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ $customCSS := resources.Get "css/custom.css" | resources.Minify }} -<link rel="stylesheet" href="{{ $customCSS.RelPermalink }}"> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 360bdca..0000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,3 +0,0 @@ -<small> - {{ .Site.Copyright }} | <a rel="me" href="mailto:miraikumiko@disroot.org" class="white-link">Email</a> | <a rel="me" href="https://underground.pm/@miraikumiko" class="white-link">Misskey</a> | <a rel="me" href="https://github.com/miraikumiko" class="white-link">Github</a> -</small> diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index f7d9d5e..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,6 +0,0 @@ -<a class="skip-link" href="#main-content">{{ i18n "skip-link" }}</a> - -<a href="{{ relURL .Site.Home.RelPermalink }}" class="title"> - <div>{{ .Site.Title }}</div> -</a> -<nav>{{- partial "nav.html" . -}}</nav> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html deleted file mode 100644 index e31262a..0000000 --- a/layouts/partials/nav.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ range .Site.Menus.main.ByWeight }} - <a href="{{ .URL }}">{{ .Name }}</a> -{{ end }} -<a href='{{ absURL "index.xml" }}'>RSS</a> - -<!-- Convert this page's translations into a dict --> -{{ $translations := dict }} -{{ range .Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} -{{ end }} - -<!-- Create a link to every translation --> -{{ range where .Site.Languages "Lang" "!=" .Page.Lang }} - {{ with (index $translations .Lang) }} - <a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a> - {{ else }} - <!-- The complicated setup was necessary to make a grayed out link --> - {{ if not .Params.hideUntranslated }} - <a class="disabled" role="link" aria-disabled="true">{{ .LanguageName }}</a> - {{ end }} - {{ end }} -{{ end }}
\ No newline at end of file diff --git a/layouts/partials/seo_tags.html b/layouts/partials/seo_tags.html deleted file mode 100644 index 07829fd..0000000 --- a/layouts/partials/seo_tags.html +++ /dev/null @@ -1,22 +0,0 @@ -<!-- Primary Meta Tags --> -<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" /> -<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> -<meta name="author" content="{{ .Site.Params.Author.name }}" /> -<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" /> - -<!-- Only generate social card if: --> -<!-- - generateSocialCard = true --> -<!-- - there aren't images set in frontmatter --> -<!-- - page is of .Kind "page" --> -{{ if and (and (default false .Site.Params.generateSocialCard) (not (isset .Params "images"))) (eq .Kind "page") }} - {{ partial "social_card.html" . }} -{{ else }} - <!-- Open Graph / Facebook --> - {{ template "_internal/opengraph.html" . }} - - <!-- Twitter --> - {{ template "_internal/twitter_cards.html" . }} - - <!-- Microdata --> - {{ template "_internal/schema.html" . }} -{{ end }} diff --git a/layouts/partials/social_card.html b/layouts/partials/social_card.html deleted file mode 100644 index 7c9fc4f..0000000 --- a/layouts/partials/social_card.html +++ /dev/null @@ -1,136 +0,0 @@ -<!-- Dynamic social card generation --> -{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/ofl/firamono/FiraMono-Bold.ttf" }} -{{ $fg := resources.Get "images/social_card_fg.png"}} -{{ $bg := resources.Get "images/social_card_bg.png"}} - -{{ if gt (len .Title) 40 }} - {{ $fg = $fg.Filter (images.Text .Title (dict - "font" $font - "color" "#fafafa" - "size" 95 - "linespacing" 16 - "x" 0 - "y" 0 - )) }} -{{ else }} - {{ $fg = $fg.Filter (images.Text .Title (dict - "font" $font - "color" "#fafafa" - "size" 130 - "linespacing" 20 - "x" 0 - "y" 0 - )) }} -{{ end }} - -{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }} -{{ $author := (default $.Site.Params.author.name ($.Param "author.name")) }} -{{ $byline := (printf "%s | %s" $author $date) }} - -{{ $fg = $fg.Filter (images.Text $byline (dict - "font" $font - "color" "#898a8d" - "size" 60 - "linespacing" 30 - "x" 0 - "y" 425 -)) }} - -{{ $card := $bg.Filter (images.Overlay $fg 112 140 ) }} -{{ $card := $card.Resize "900x webp q100" }} - -<!-- Open Graph / Facebook --> -<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/opengraph.html --> -<meta property="og:title" content="{{ .Title }}" /> -<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> -<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> -<meta property="og:url" content="{{ .Permalink }}" /> - -<meta property="og:image" content="{{ $card.Permalink | absURL }}"/> - -{{- if .IsPage }} -{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} -<meta property="article:section" content="{{ .Section }}" /> -{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} -{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} -{{- end -}} - -{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }} -{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }} -{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }} -{{- with .Params.videos }}{{- range . }} -<meta property="og:video" content="{{ . | absURL }}" /> -{{ end }}{{ end }} - -{{- /* If it is part of a series, link to related articles */}} -{{- $permalink := .Permalink }} -{{- $siteSeries := .Site.Taxonomies.series }} -{{- if $siteSeries }} -{{ with .Params.series }}{{- range $name := . }} - {{- $series := index $siteSeries ($name | urlize) }} - {{- range $page := first 6 $series.Pages }} - {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }} - {{- end }} -{{ end }}{{ end }} -{{- end }} - -{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} -{{- $facebookAdmin := "" }} -{{- with site.Params.social }} - {{- if reflect.IsMap . }} - {{- $facebookAdmin = .facebook_admin }} - {{- end }} -{{- else }} - {{- with site.Social.facebook_admin }} - {{- $facebookAdmin = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} - {{- end }} -{{- end }} - -{{- /* Facebook Page Admin ID for Domain Insights */}} -{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }} - -<!-- Twitter --> -<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html --> -<meta name="twitter:card" content="summary_large_image"/> -<meta name="twitter:image" content="{{ $card.Permalink | absURL }}"/> -<meta name="twitter:title" content="{{ .Title }}"/> -<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/> - -{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} -{{- $twitterSite := "" }} -{{- with site.Params.social }} - {{- if reflect.IsMap . }} - {{- $twitterSite = .twitter }} - {{- end }} -{{- else }} - {{- with site.Social.twitter }} - {{- $twitterSite = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} - {{- end }} -{{- end }} - -{{- with $twitterSite }} - {{- $content := . }} - {{- if not (strings.HasPrefix . "@") }} - {{- $content = printf "@%v" $twitterSite }} - {{- end }} -<meta name="twitter:site" content="{{ $content }}"/> -{{- end }} - -<!-- Microdata --> -<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/schema.html --> -<meta itemprop="name" content="{{ .Title }}"> -<meta itemprop="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> - -{{- if .IsPage -}} -{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} -{{ with .PublishDate }}<meta itemprop="datePublished" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end}} -{{ with .Lastmod }}<meta itemprop="dateModified" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end}} -<meta itemprop="wordCount" content="{{ .WordCount }}"> - -<meta itemprop="image" content="{{ $card.Permalink | absURL }}"/> - -<!-- Output all taxonomies as schema.org keywords --> -<meta itemprop="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" /> -{{- end -}} |