mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-12-03 04:18:57 -05:00
strip any markdown in page titles from meta/social tags in head
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{{- $section := $.Site.GetPage "section" .Section }}
|
||||
{{- range .Site.AllPages -}}
|
||||
{{- if or (and (.IsDescendant $section) (and (not .Draft) (not .Params.private))) $section.IsHome -}}
|
||||
{{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "description" .Description "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "summary" .Summary "title" .Title "type" .Type "url" .RelPermalink "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "authors" $.Site.Author.name)}}
|
||||
{{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "description" .Description "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "summary" .Summary "title" (.Title | markdownify | htmlUnescape | plainify) "type" .Type "url" .RelPermalink "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "authors" $.Site.Author.name)}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<!doctype html>
|
||||
<html ⚡ lang="en">
|
||||
<head>
|
||||
{{ partial "functions/meta-scratch" . }}
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
||||
@@ -12,7 +13,7 @@
|
||||
{{ if .HasShortcode "gist" }}<script async custom-element="amp-gist" src="https://cdn.ampproject.org/v0/amp-gist-0.1.js"></script>{{ end }}
|
||||
{{ if .HasShortcode "instagram" }}<script async custom-element="amp-instagram" src="https://cdn.ampproject.org/v0/amp-instagram-0.1.js"></script>{{ end }}
|
||||
{{ if .HasShortcode "vimeo" }}<script async custom-element="amp-vimeo" src="https://cdn.ampproject.org/v0/amp-vimeo-0.1.js"></script>{{ end }}
|
||||
<title>{{ .Title }} – {{ .Site.Title }}</title>
|
||||
<title>{{ .Scratch.Get "plainTitle" }} – {{ .Site.Title }}</title>
|
||||
{{ with .OutputFormats.Get "html" }}<link rel="canonical" href="{{ .Permalink }}">{{ end }}
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user