Merge pull request #20 from remeika/summary

Use Hugo's content summary feature for documentation overview
This commit is contained in:
Robert Austin 2019-08-06 14:40:35 +10:00 committed by GitHub
commit f7bbb030ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View file

@ -8,6 +8,10 @@ pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true
pygmentsUseClasses = true
# Controls how many words are printed in the content summary on the docs homepage.
# See https://gohugo.io/content-management/summaries/
summaryLength = 30
[[menu.main]]
name = "Home"
url = "/"

View file

@ -3,6 +3,7 @@ title: 'Configuration'
date: 2019-02-11T19:30:08+10:00
draft: false
weight: 4
summary: Syntax highlighting and menus can be configured via `config.toml`.
---
## Syntax Highlighting

View file

@ -4,7 +4,9 @@ date: 2019-02-11T19:27:37+10:00
weight: 7
---
Whisper is a minimal documentation theme built for Hugo. The design and functionality is intentionally minimal.
Whisper is a minimal documentation theme built for Hugo. The design & functionality is intentionally minimal.
<!--more-->
## Quickstart

View file

@ -3,5 +3,5 @@
<img alt="{{ .Title }}" src="{{ .Params.image }}" />
{{ end}}
<h2 class="title-summary"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<p>{{ htmlUnescape .Content | plainify | truncate 140 }}</p>
<p>{{ .Summary }}</p>
</div>