Skip to content

Commit

Permalink
Improve posts title rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed May 3, 2021
1 parent c197f33 commit 9e9c7d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/docs/post-meta.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ with .Date}}
{{ with .Date }}
<h5>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</h5>
{{ end }}

Expand All @@ -12,12 +12,12 @@ <h5>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat)
{{ 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 changes: 1 addition & 1 deletion layouts/posts/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/posts/single.html
Original file line number Diff line number Diff line change
@@ -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 -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/taxonomy/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 9e9c7d3

Please sign in to comment.