-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy paper theme's head.html, add plausible script tag
- Loading branch information
Showing
1 changed file
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{{/* Copied and modified version of themes/paper/layouts/partials/head.html */}} | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
/> | ||
|
||
<!-- Title --> | ||
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title> | ||
|
||
<!-- Meta --> | ||
<meta name="theme-color" /> | ||
|
||
<!-- Author --> | ||
{{ $site_author := or site.Author.name site.Params.name site.Title }} | ||
<!----> | ||
{{ if eq .Kind "page" }} | ||
<meta name="description" content="{{ .Summary }}" /> | ||
<meta name="author" content="{{ or .Params.author $site_author }}" /> | ||
{{ else }} | ||
<!----> | ||
<meta | ||
name="description" | ||
content="{{ site.Params.description | default (print `A personal blog`) }}" | ||
/> | ||
<meta name="author" content="{{ $site_author }}" /> | ||
{{ end }} | ||
|
||
<!-- CSS & JS --> | ||
{{ $main := resources.Get "main.css" }} | ||
<!----> | ||
{{ $custom := resources.Get "custom.css" }} | ||
<!----> | ||
{{ $css := slice $main $custom | resources.Concat "main.css" | minify }} | ||
<link rel="preload stylesheet" as="style" href="{{ $css.Permalink }}" /> | ||
|
||
<!-- Dark Icon --> | ||
{{ $dark_icon := "theme.png" }} | ||
<!----> | ||
{{ if site.Params.monoDarkIcon }}{{ $dark_icon = "theme.svg" }}{{ end }} | ||
<!----> | ||
<link rel="preload" as="image" href="{{ $dark_icon | absURL }}" /> | ||
|
||
<!-- Avatar --> | ||
{{ $avatar_url := $.Scratch.Get "avatar_url" }} | ||
<!----> | ||
{{ if $avatar_url }} | ||
<link rel="preload" as="image" href="{{ $avatar_url }}" /> | ||
{{ end }} | ||
<!----> | ||
|
||
<!-- Social List --> | ||
{{ range $.Scratch.Get "social_list" }} | ||
<link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}" /> | ||
{{ end }} | ||
<!----> | ||
|
||
<!-- Highlight JS --> | ||
{{ if and .IsPage (not site.Params.disableHLJS) }} | ||
<script | ||
defer | ||
src="{{ `highlight.min.js` | absURL }}" | ||
onload="hljs.initHighlightingOnLoad();" | ||
></script> | ||
{{ end }} | ||
|
||
<!-- Math --> | ||
{{ if or .Params.math site.Params.math }} | ||
<!----> | ||
{{ partial "math.html" . }} | ||
<!----> | ||
{{ end }} | ||
<!----> | ||
|
||
<!-- Favicon --> | ||
<link rel="icon" href="{{ site.Params.favicon | default `favicon.ico` | absURL }}" /> | ||
<link rel="apple-touch-icon" href="{{ site.Params.appleTouchIcon | default `apple-touch-icon.png` | absURL }}" /> | ||
|
||
<!-- Generator --> | ||
{{ hugo.Generator }} | ||
|
||
<!-- Production --> | ||
{{ if or hugo.IsProduction (eq site.Params.env "production") }} | ||
<!----> | ||
{{ template "_internal/google_analytics.html" . }} | ||
<!----> | ||
{{ template "_internal/schema.html" . }} | ||
<!----> | ||
{{ template "_internal/opengraph.html" . }} | ||
<!----> | ||
{{ template "_internal/twitter_cards.html" . }} | ||
<!-- RSS --> | ||
{{ range .AlternativeOutputFormats }} | ||
<link | ||
rel="{{ .Rel }}" | ||
type="{{ .MediaType.Type }}" | ||
href="{{ .Permalink }}" | ||
title="{{ site.Title }}" | ||
/> | ||
{{ end }} | ||
<!-- Canonical --> | ||
<link rel="canonical" href="{{ .Permalink }}" /> | ||
{{ end }} | ||
<!----> | ||
|
||
<script defer data-domain="canxerian.com" src="https://plausible.uksouth.cloudapp.azure.com/js/script.js"></script> | ||
</head> |