diff options
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/services/summary.html | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 01e7337..a75865e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -43,6 +43,9 @@ title = "Hugo Serif Theme" meta_twitter_creator = "@zerostaticio" meta_og_image = "https://www.zerostatic.io/theme/hugo-serif/hugo-serif-screenshot.png" + [params.services] + summary_truncate = 120 # How many characters to include in the summary of the services before truncating + [params.team] summary_large_truncate = 120 # How many characters to include in the summary of the team bios (large layout) before truncating diff --git a/layouts/services/summary.html b/layouts/services/summary.html index bccd45e..4e64cc7 100644 --- a/layouts/services/summary.html +++ b/layouts/services/summary.html @@ -3,6 +3,6 @@ <h2 class="service-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a> </h2> - <p>{{ .Content | plainify | htmlUnescape | truncate 120 "…" }}</p> + <p>{{ .Content | plainify | htmlUnescape | truncate (.Site.Params.services.summary_truncate | default 120 ) "…" }}</p> </div> </div> |