How to change summary length in config.toml

Hello all,

I tried to change the length of the summary in config.toml using this code,

baseURL = "https://example.com/"
languageCode = "en-us"
title = "summary"
theme = "Hugo- Organization Portfolio"
summary = "summaryLength (20)"

I checked these links,

  1. https://gohugo.io/content-management/summaries/#automatic-summary-splitting,
  2. https://gohugo.io/getting-started/configuration/

but not clear info is given.

but doesn’t change anything. What is the correction in config. Kindly let me know.

From the docs link#2:

summaryLength (70)

Here, summaryLength is the config variable, 70 is the default value.

So in your case, you would put in your config:

summaryLength = 70
2 Likes

Thanks so much it worked!

hi

i add this in my config.toml but my summary don’t change :frowning:
have you an idee for help me ?

Please read Requesting Help .