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 - Responsive and mobile friendly
- Simple and refreshing one page design - Simple and refreshing one page design
- Easy to customize - Easy to customize
<!--more-->
## Installation ## Installation

View file

@ -6,7 +6,7 @@ title = "Writing content with Markdown, LaTeX, and Shortcodes"
math = true 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 ## Sub-headings

View file

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

View file

@ -14,7 +14,13 @@
{{end}} {{end}}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ partial "article_metadata" (dict "content" . "is_list" 1) }} {{ 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> </div>
{{ end }} {{ end }}