From e699ce661ed441f576f9f705e2437e8bb30e6501 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Tue, 15 Feb 2022 01:13:11 -0500 Subject: [PATCH] Added h-card, h-entry, rel-me links --- layouts/blog/single.html | 27 +++++++++++++--- layouts/index.html | 19 ++++++++--- layouts/partials/head.html | 63 +++++++++++++++++++----------------- layouts/partials/header.html | 14 ++++---- layouts/tags/baseof.html | 4 +-- layouts/tags/rss.xml | 7 +++- 6 files changed, 86 insertions(+), 48 deletions(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index e2e659d..86d4369 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,10 +1,12 @@ {{ define "main"}} -

{{ .Title }}

+
+

{{ .Title }}

{{ partial "header.html" . }} {{ if not .Date.IsZero }} {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} -

{{ .Date.Format $singlePageDateFormat }}

+

+ {{ end }}
@@ -12,14 +14,31 @@ {{ range .Param "tags" }} {{ $name := . }} {{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }} -
  • {{ $name }}
  • +
  • {{ $name }}
  • {{ end }} {{ end }}
    -
    +
    {{ .Content }}
    +
    + {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index d8b45d9..cf73a52 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,18 +3,19 @@ {{- partial "head.html" . -}}
    -
    +
    - avatar + avatar avatar-border
    -

    {{ .Site.Params.Author }}

    +

    {{ .Site.Params.Author }}

    +
    -

    +

    {{ .Site.Params.description | safeHTML }}

    @@ -23,10 +24,20 @@ {{ range .Site.Menus.main }}
  • {{ .Pre }}
    {{ .Name }}
  • {{ end }} + {{ range .Site.Menus.profile }} +
  • {{ .Pre }}
    {{ .Name }}
  • + {{ end }}
    {{- partial "footer.html" . -}} + diff --git a/layouts/partials/head.html b/layouts/partials/head.html index bf60b68..fca8d89 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,39 +1,48 @@ + - - {{ if eq .Title .Site.Title }} - {{ .Site.Title }} - {{ else }} - {{ .Title }} - {{ .Site.Title }} - {{ end }} - - + + + {{- if eq .Title .Site.Title -}} + {{ .Site.Title }} + {{- else -}} + {{ .Title }} - {{ .Site.Title }} + {{- end -}} + + + - {{ range .Site.Params.identities}} - - {{ end }} + {{- range .Site.Params.identities -}} + + {{ end -}} - - {{ $style := resources.Get "css/style.css" }} - {{ $markdown := resources.Get "css/markdown.css" }} - {{ $fontawesome := resources.Get "css/fontawesome.css" }} - {{ $syntaxHighlight := resources.Get "css/syntax-highlight.css" }} + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + {{- $style := resources.Get "css/style.css" -}} + {{- $markdown := resources.Get "css/markdown.css" -}} + {{- $fontawesome := resources.Get "css/fontawesome.css" -}} + {{- $syntaxHighlight := resources.Get "css/syntax-highlight.css" -}} {{ $css := slice $style $markdown $fontawesome $syntaxHighlight | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }} - {{ $styleDark := resources.Get "css/style-dark.css" }} - {{ $markdownDark := resources.Get "css/markdown-dark.css" }} + {{- $styleDark := resources.Get "css/style-dark.css" -}} + {{- $markdownDark := resources.Get "css/markdown-dark.css" -}} {{ $cssDark := slice $styleDark $markdownDark | resources.Concat "css/style-dark.css" | resources.Minify | resources.Fingerprint }} - {{ range .Site.Params.custom_css }} - - {{ end }} + {{- range .Site.Params.custom_css -}} + + {{ end -}} {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}} {{- template "_internal/opengraph.html" . -}} @@ -51,14 +60,8 @@ ` | safeHTML }} - - {{- if and (not .Site.IsServer) .Site.GoogleAnalytics -}} - {{ template "_internal/google_analytics_async.html" . }} - {{- end -}} - - {{ if or .Params.math .Site.Params.math }} - {{ partial "mathjax_support.html" . }} - {{ end }} - + {{- if or .Params.math .Site.Params.math -}} + {{ partial "mathjax_support.html" . }} + {{- end -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index fbf6513..a68b0c7 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,13 +1,13 @@ -
    +
    - {{ .Site.Params.avatarDescription }} + {{ .Site.Params.avatarDescription }}
    -

    {{ .Site.Params.Author }}

    - - {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} - {{ end -}} +

    {{ .Site.Params.Author }}

    + +
    diff --git a/layouts/tags/baseof.html b/layouts/tags/baseof.html index 0ab5755..12c4904 100644 --- a/layouts/tags/baseof.html +++ b/layouts/tags/baseof.html @@ -1,7 +1,7 @@ - {{ partial "head.html" . }} + {{- partial "head.html" . -}} - {{ block "main" . }}{{ end }} + {{- block "main" . -}}{{- end -}} diff --git a/layouts/tags/rss.xml b/layouts/tags/rss.xml index 3e17f48..8bdf02a 100644 --- a/layouts/tags/rss.xml +++ b/layouts/tags/rss.xml @@ -1,6 +1,11 @@ {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := $pctx.RegularPages -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}}