Improve rendering of post summaries

This commit is contained in:
George Cushen 2016-09-13 03:46:26 +01:00
commit 1f77c0572b
4 changed files with 10 additions and 4 deletions

View file

@ -18,7 +18,7 @@ Key features:
- Responsive and mobile friendly
- Simple and refreshing one page design
- Easy to customize
<!--more-->
## Installation

View file

@ -6,7 +6,7 @@ title = "Writing content with Markdown, LaTeX, and Shortcodes"
math = true
+++
Content can be written using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet), [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics), and [Hugo Shortcodes](http://gohugo.io/extras/shortcodes/). Additionally, HTML may be used for advanced formatting.
Content can be written using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet), [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics), and [Hugo Shortcodes](http://gohugo.io/extras/shortcodes/). Additionally, HTML may be used for advanced formatting.<!--more-->
## Sub-headings

View file

@ -112,7 +112,7 @@
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
<p class="article-style" itemprop="articleBody">
{{ if .Truncated }}
{{ .Summary }}
{{ printf "%s" .Summary | markdownify }}
{{ else }}
{{ .Content }}
{{ end }}

View file

@ -14,7 +14,13 @@
{{end}}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
<div class="article-style"><p>{{ .Summary }}</p></div>
<div class="article-style"><p>
{{ if .Truncated }}
{{ printf "%s" .Summary | markdownify }}
{{ else }}
{{ .Content }}
{{ end }}
</p></div>
</div>
{{ end }}