From 0a7e0a765062588b5204b43e643197e5d988176d Mon Sep 17 00:00:00 2001 From: James Remeika Date: Mon, 5 Aug 2019 23:48:37 -0400 Subject: [PATCH 1/3] Use summary page bar --- layouts/_default/summary.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 9cfe8f2..1231103 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -3,5 +3,5 @@ {{ .Title }} {{ end}}

{{ .Title }}

-

{{ htmlUnescape .Content | plainify | truncate 140 }}

+

{{ .Summary }}

From 412ca20c864387f1d301385bc68244ce14f21c9d Mon Sep 17 00:00:00 2001 From: James Remeika Date: Tue, 6 Aug 2019 00:09:34 -0400 Subject: [PATCH 2/3] Adds examples of using content summary to example site --- exampleSite/config.toml | 4 ++++ exampleSite/content/docs/configure/index.md | 1 + exampleSite/content/docs/example/index.md | 2 ++ 3 files changed, 7 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3098ab5..c406f1c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -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 = "/" diff --git a/exampleSite/content/docs/configure/index.md b/exampleSite/content/docs/configure/index.md index d8cfb4c..48d9e60 100644 --- a/exampleSite/content/docs/configure/index.md +++ b/exampleSite/content/docs/configure/index.md @@ -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 diff --git a/exampleSite/content/docs/example/index.md b/exampleSite/content/docs/example/index.md index 7cb254c..914f72e 100644 --- a/exampleSite/content/docs/example/index.md +++ b/exampleSite/content/docs/example/index.md @@ -6,6 +6,8 @@ weight: 7 Whisper is a minimal documentation theme built for Hugo. The design and functionality is intentionally minimal. + + ## Quickstart Copy or git clone this theme into the sites themes folder `mynewsite/themes` From fecd9243b93ff7a86496ff8b8a8e9b38adc79acb Mon Sep 17 00:00:00 2001 From: James Remeika Date: Tue, 6 Aug 2019 00:21:10 -0400 Subject: [PATCH 3/3] Adds HTML escape character --- exampleSite/content/docs/example/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/docs/example/index.md b/exampleSite/content/docs/example/index.md index 914f72e..2b95de0 100644 --- a/exampleSite/content/docs/example/index.md +++ b/exampleSite/content/docs/example/index.md @@ -4,7 +4,7 @@ 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.