Improve rendering of post summaries

This commit is contained in:
George Cushen committed 2016-09-13 03:46:26 +01:00
1 parent ea14475b1f
commit 1f77c0572b
4 files changed
+10 -4

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ Key features:
- Responsive and mobile friendly
- Simple and refreshing one page design
- Easy to customize
<!--more-->
## Installation
@@ -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
+1 -1
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 }}
+7 -1
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 }}