lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
199 stars 98 forks source link

Expanded summary #105

Closed JonAugust closed 1 year ago

JonAugust commented 1 year ago

I'm new to Hugo and I've tried to find a setting for this, but nothing has worked. On my index page, there are summaries of the posts, but they're collapsed. Spacing between paragraphs conveys some meaning, so it would be good if the collapsed summary retained that formatting. Is there a setting for keeping the formatting in the summary? Or showing the entire post on the summary?

I tried maxShownLines = -1 in my hugo.toml, as this seems to work with some themes, but as far as I could tell, not with Poison. Thank you for your help!

JonAugust commented 1 year ago

After some additional research, I've found that Hugo is producing the Summary variable used by Poison. If you'd like to retain the formatting for your summary, you have to manually insert the split using this: <!--more--> Note: it must be exactly like this - no spaces, all lowercase. It will retain formatting up until your split.

lukeorth commented 1 year ago

Hi @JonAugust, sorry for my delayed response on this.

That is correct -- you'll want to use <!--more--> to manually split content summaries and preserve formatting. I'll leave this link to Hugo's docs on Content Summaries in case anyone else has similar problems in the future.