mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-24 20:33:00 +00:00
Improve posts title rendering
This commit is contained in:
parent
c197f3399b
commit
9e9c7d3403
@ -1,4 +1,4 @@
|
||||
{{ with .Date}}
|
||||
{{ with .Date }}
|
||||
<h5>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</h5>
|
||||
{{ end }}
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.image }}
|
||||
<p>
|
||||
{{ if .Params.image}}
|
||||
{{ with .Resources.GetMatch .Params.image }}
|
||||
<img src={{ .RelPermalink }} />
|
||||
{{ else }}
|
||||
<img src={{ .Params.image | relURL }} />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{ range sort .Paginator.Pages }}
|
||||
<article class="markdown book-post">
|
||||
<h2>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||
</h2>
|
||||
{{ partial "docs/post-meta" . }}
|
||||
<p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<article class="markdown">
|
||||
<h1>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||
</h1>
|
||||
{{ partial "docs/post-meta" . }}
|
||||
{{- .Content -}}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{ range sort .Paginator.Pages }}
|
||||
<article class="markdown book-post">
|
||||
<h2>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||
</h2>
|
||||
{{ partial "docs/post-meta" . }}
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user