Merge pull request #199 from Mitrichius/markdonify-titles-198

Markdonify titles #198
This commit is contained in:
Dmitry Kolosov 2023-08-12 10:29:22 +02:00 committed by GitHub
commit d6d76db80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="articles h-feed"> <div class="articles h-feed">
<h1 class="post-title">{{ i18n .Title }}</h1> <h1 class="post-title">{{ i18n .Title | markdownify }}</h1>
{{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }} {{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }}
{{ $pages := where .Pages "Params.hidden" "!=" true}} {{ $pages := where .Pages "Params.hidden" "!=" true}}
@ -17,7 +17,7 @@
<div class="post-short-list h-entry"> <div class="post-short-list h-entry">
<div class="post-header"> <div class="post-header">
<header> <header>
<h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2> <h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a></h2>
{{ partial "post-language-switcher.html" . }} {{ partial "post-language-switcher.html" . }}
</header> </header>
</div> </div>

View File

@ -2,7 +2,7 @@
{{ if .Menus }} {{ if .Menus }}
<nav class="post-navigation"> <nav class="post-navigation">
{{ range .Menus }} {{ range .Menus }}
<a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a> <a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name | markdownify }}</a>
{{ end }} {{ end }}
</nav> </nav>
{{ end }} {{ end }}
@ -10,7 +10,7 @@
<article class="post h-entry"> <article class="post h-entry">
<div class="post-header"> <div class="post-header">
<header> <header>
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1> <h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " | markdownify }}</h1>
{{ partial "post-language-switcher.html" . }} {{ partial "post-language-switcher.html" . }}
</header> </header>

View File

@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
<h1>{{ i18n .Data.Singular | humanize }}: {{ .Title }}</h1> <h1>{{ i18n .Data.Singular | humanize | markdownify }}: {{ .Title | markdownify }}</h1>
<div class="post-info"> <div class="post-info">
<a href="{{ (print .Data.Plural "/") | relLangURL }}">{{ i18n (printf "toAll%s" (.Data.Plural | humanize )) | humanize }}</a> <a href="{{ (print .Data.Plural "/") | relLangURL }}">{{ i18n (printf "toAll%s" (.Data.Plural | humanize )) | humanize }}</a>
</div> </div>

View File

@ -3,13 +3,13 @@
{{ .Content }} {{ .Content }}
</div> </div>
<h1>{{ i18n .Title }}</h1> <h1>{{ i18n .Title | markdownify }}</h1>
<ul class="terms"> <ul class="terms">
{{ range .Data.Terms }} {{ range .Data.Terms }}
{{ $postsNum := len (where .Pages "Params.hidden" "!=" true) }} {{ $postsNum := len (where .Pages "Params.hidden" "!=" true) }}
{{ if gt $postsNum 0 }} {{ if gt $postsNum 0 }}
<li> <li>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> <a href="{{ .Page.RelPermalink }}">{{ .Page.Title | markdownify }}</a>
({{ $postsNum }}) ({{ $postsNum }})
</li> </li>
{{ end}} {{ end}}

View File

@ -4,12 +4,12 @@
<div class="pagination post-pagination"> <div class="pagination post-pagination">
<div class="left pagination-item {{ if not .NextInSection }}disabled{{ end }}"> <div class="left pagination-item {{ if not .NextInSection }}disabled{{ end }}">
{{ if .NextInSection }} {{ if .NextInSection }}
<a href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title | default $toNewPostMessage }}</a> <a href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title | default $toNewPostMessage | markdownify }}</a>
{{ end }} {{ end }}
</div> </div>
<div class="right pagination-item {{ if not .PrevInSection }}disabled{{ end }}"> <div class="right pagination-item {{ if not .PrevInSection }}disabled{{ end }}">
{{ if .PrevInSection }} {{ if .PrevInSection }}
<a href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title | default $toOldPostMessage }}</a> <a href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title | default $toOldPostMessage | markdownify }}</a>
{{ end }} {{ end }}
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<article class="post-list h-feed"> <article class="post-list h-feed">
<div class="post-header"> <div class="post-header">
<header> <header>
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1> <h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a></h1>
</header> </header>
{{ partial "post-language-switcher.html" . }} {{ partial "post-language-switcher.html" . }}
</div> </div>

View File

@ -1 +1 @@
<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> <title>{{ if and (.Title) (not .IsHome) }}{{ .Title | markdownify }} - {{ end }}{{ .Site.Title | markdownify }}</title>