Initial commit
This commit is contained in:
15
layouts/partials/head/favicon.html
Normal file
15
layouts/partials/head/favicon.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
href="/favicon/favicon-96x96.png"
|
||||
sizes="96x96"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
|
||||
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
href="/favicon/apple-touch-icon.png"
|
||||
/>
|
||||
<meta name="apple-mobile-web-app-title" content="Valknar's" />
|
||||
<link rel="manifest" href="/favicon/site.webmanifest" />
|
||||
47
layouts/partials/head/json-ld.html
Executable file
47
layouts/partials/head/json-ld.html
Executable file
@@ -0,0 +1,47 @@
|
||||
{{/* Website schema for homepage */}}
|
||||
{{- if .IsHome }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.author }}",
|
||||
"email": "{{ .Site.Params.email }}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{/* MusicRecording schema for track pages */}}
|
||||
{{- if and .IsPage (eq .Section "tracks") }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "MusicRecording",
|
||||
"name": "{{ .Title }}",
|
||||
"description": "{{ .Description | default .Summary | plainify }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
"datePublished": "{{ .Date.Format "2006-01-02" }}",
|
||||
"byArtist": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Params.artist | default .Site.Params.author }}"
|
||||
}
|
||||
{{- if .Params.audio }},
|
||||
"audio": {
|
||||
"@type": "AudioObject",
|
||||
"contentUrl": "{{ .Params.audio }}"
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Params.genre }},
|
||||
"genre": "{{ .Params.genre }}"
|
||||
{{- end }}
|
||||
{{- with .Resources.GetMatch "cover.*" }},
|
||||
"image": "{{ .Permalink }}"
|
||||
{{- end }}
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
29
layouts/partials/head/meta.html
Executable file
29
layouts/partials/head/meta.html
Executable file
@@ -0,0 +1,29 @@
|
||||
{{- $title := cond .IsHome .Site.Title (printf "%s | %s" .Title .Site.Title) -}}
|
||||
{{- $desc := .Description | default .Summary | default .Site.Params.description | plainify | truncate 160 -}}
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<title>{{ $title }}</title>
|
||||
<meta name="description" content="{{ $desc }}">
|
||||
<meta name="author" content="{{ .Site.Params.author }}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{/* Theme */}}
|
||||
<meta name="theme-color" content="#0a0a0a">
|
||||
<meta name="color-scheme" content="dark">
|
||||
|
||||
{{/* Favicon */}}
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
{{/* RSS */}}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ "index.xml" | absURL }}">
|
||||
|
||||
{{/* Robots */}}
|
||||
{{- $robots := "index, follow" -}}
|
||||
{{- if .Params.noindex -}}
|
||||
{{- $robots = "noindex, nofollow" -}}
|
||||
{{- end -}}
|
||||
<meta name="robots" content="{{ $robots }}">
|
||||
30
layouts/partials/head/opengraph.html
Executable file
30
layouts/partials/head/opengraph.html
Executable file
@@ -0,0 +1,30 @@
|
||||
{{- $title := .Title | default .Site.Title -}}
|
||||
{{- $desc := .Description | default .Summary | default .Site.Params.description | plainify | truncate 200 -}}
|
||||
{{- $image := .Params.image | default "/images/og-default.png" -}}
|
||||
{{- if not (strings.HasPrefix $image "http") -}}
|
||||
{{- $image = $image | absURL -}}
|
||||
{{- end -}}
|
||||
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $desc }}">
|
||||
<meta property="og:type" content="{{ cond (eq .Section "tracks") "music.song" "website" }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
{{- if $image }}
|
||||
<meta property="og:image" content="{{ $image }}">
|
||||
<meta property="og:image:alt" content="{{ $title }}">
|
||||
{{- end }}
|
||||
|
||||
{{/* Audio-specific OpenGraph tags */}}
|
||||
{{- if and (eq .Section "tracks") .Params.audio }}
|
||||
<meta property="og:audio" content="{{ .Params.audio }}">
|
||||
<meta property="og:audio:type" content="audio/mpeg">
|
||||
{{- if .Params.duration }}
|
||||
<meta property="music:duration" content="{{ .Params.duration }}">
|
||||
{{- end }}
|
||||
{{- if .Params.artist }}
|
||||
<meta property="music:musician" content="{{ .Params.artist }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
16
layouts/partials/head/preload.html
Executable file
16
layouts/partials/head/preload.html
Executable file
@@ -0,0 +1,16 @@
|
||||
{{/* Preconnect to external domains */}}
|
||||
<link rel="preconnect" href="https://jellyfin.media.pivoine.art" crossorigin>
|
||||
|
||||
{{/* DNS prefetch */}}
|
||||
<link rel="dns-prefetch" href="https://unpkg.com">
|
||||
|
||||
{{/* Preload fonts if we add custom fonts later */}}
|
||||
{{/* <link rel="preload" href="/fonts/JetBrainsMono-Regular.woff2" as="font" type="font/woff2" crossorigin> */}}
|
||||
|
||||
{{/* Preload cover image on track pages */}}
|
||||
{{- if and .IsPage (eq .Section "tracks") }}
|
||||
{{- with .Resources.GetMatch "cover.*" }}
|
||||
{{- $webp := .Resize "800x webp q85" }}
|
||||
<link rel="preload" href="{{ $webp.RelPermalink }}" as="image" type="image/webp">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
21
layouts/partials/head/twitter.html
Executable file
21
layouts/partials/head/twitter.html
Executable file
@@ -0,0 +1,21 @@
|
||||
{{- $title := .Title | default .Site.Title -}}
|
||||
{{- $desc := .Description | default .Summary | default .Site.Params.description | plainify | truncate 200 -}}
|
||||
{{- $image := .Params.image | default "/images/og-default.png" -}}
|
||||
{{- if not (strings.HasPrefix $image "http") -}}
|
||||
{{- $image = $image | absURL -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Determine card type */}}
|
||||
{{- $cardType := "summary" -}}
|
||||
{{- if $image -}}
|
||||
{{- $cardType = "summary_large_image" -}}
|
||||
{{- end -}}
|
||||
|
||||
<meta name="twitter:card" content="{{ $cardType }}">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $desc }}">
|
||||
|
||||
{{- if $image }}
|
||||
<meta name="twitter:image" content="{{ $image }}">
|
||||
<meta name="twitter:image:alt" content="{{ $title }}">
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user