Specify markdownify or plainify for .Title references

This commit is contained in:
BBaoVanC 2021-11-20 19:05:56 -06:00
parent 919ecde4ac
commit a01a70fc91
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
7 changed files with 12 additions and 12 deletions

View File

@ -75,7 +75,7 @@
← {{ i18n "newer_post" }}
</div>
<div class="prev-post">
{{ .Title }}
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
@ -88,7 +88,7 @@
{{ i18n "older_post" }} &rarr;
</div>
<div class="next-post">
{{ .Title }}
{{ .Title | markdownify }}
</div>
</a>
{{ else }}

View File

@ -21,9 +21,9 @@
{{ end }}
{{ if .IsHome }}
<title>{{ .Site.Title }}</title>
<title>{{ .Site.Title | plainify }}</title>
{{ else }}
<title>{{ print .Title " | " .Site.Title }}</title>
<title>{{ (print .Title " | " .Site.Title) | plainify }}</title>
{{ end }}
{{ partial "opengraph.html" . }}

View File

@ -1,15 +1,15 @@
{{ range .AlternativeOutputFormats }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}">
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title | plainify }}">
{{ end }}
{{ with .OutputFormats.Get "rss" }}
<link rel="start" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}">
<link rel="start" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title | plainify }}">
{{ end }}
{{ with .PrevInSection }}
<link rel="prev" title="{{ .Title }}" href="{{ .Permalink }}">
<link rel="prev" title="{{ .Title | plainify }}" href="{{ .Permalink }}">
{{ end }}
{{ with .NextInSection }}
<link rel="next" title="{{ .Title }}" href="{{ .Permalink }}">
<link rel="next" title="{{ .Title | plainify }}" href="{{ .Permalink }}">
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">

View File

@ -1,4 +1,4 @@
<meta property="og:title" content="{{ .Title }}">
<meta property="og:title" content="{{ .Title | plainify }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify }}{{ 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 }}">

View File

@ -1,4 +1,4 @@
<meta itemprop="name" content="{{ .Title }}">
<meta itemprop="name" content="{{ .Title | plainify }}">
<meta itemprop="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ $format := "2006-01-02T15:04:05-07:00" }}

View File

@ -5,7 +5,7 @@
<div class="topbar">
<nav class="navbar">
{{ with .Site.Home }}
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
{{ end }}
{{ range .Site.Menus.main }}

View File

@ -11,7 +11,7 @@
{{ partial "icon.html" "filter" }}
{{ end }}
{{ .Title }}
{{ .Title | markdownify }}
{{ if eq .Kind "term" }}
<span class="rss-link">