Improve posts title rendering
This commit is contained in:
parent
c197f3399b
commit
9e9c7d3403
4 changed files with 6 additions and 6 deletions
|
@ -12,12 +12,12 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<p>
|
|
||||||
{{ if .Params.image }}
|
{{ if .Params.image }}
|
||||||
|
<p>
|
||||||
{{ with .Resources.GetMatch .Params.image }}
|
{{ with .Resources.GetMatch .Params.image }}
|
||||||
<img src={{ .RelPermalink }} />
|
<img src={{ .RelPermalink }} />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src={{ .Params.image | relURL }} />
|
<img src={{ .Params.image | relURL }} />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
</p>
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ range sort .Paginator.Pages }}
|
{{ range sort .Paginator.Pages }}
|
||||||
<article class="markdown book-post">
|
<article class="markdown book-post">
|
||||||
<h2>
|
<h2>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<article class="markdown">
|
<article class="markdown">
|
||||||
<h1>
|
<h1>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
{{- .Content -}}
|
{{- .Content -}}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ range sort .Paginator.Pages }}
|
{{ range sort .Paginator.Pages }}
|
||||||
<article class="markdown book-post">
|
<article class="markdown book-post">
|
||||||
<h2>
|
<h2>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue