Post Shortening

I’m sure this has been discussed many times before, but search is failing me this morning.

How can I make my posts cutoff and require a “read more” link at a certain length?

I would assume there would be something in “design” or “plugins” but there does not appear to be. Does one need to edit CSS?

(I assume there is also a manual way with markdown, wherein you can specify it at a specific location, but this may or may not be interpreted differently by themes and newsletters?)

1 Like

It depends entirely on the “where” you want to do this and your theme. For example, if this is for your index page and newsletter, you’d have to edit two templates in your theme to use {{ .Summary }} instead of {{ .Content }}. Hugo by default will just take the first X characters (set by summaryLength in your config.json file. You can use <!--more--> to set the break point manually in your posts. does not support setting custom summaries in your front matter, so the summary has to come from the beginning of your content.

See here for more.

1 Like

The Tiny theme supports this. As far as I know, all other themes require custom coding for that.

1 Like

Add <!—more—> tag where ever you want the post to truncate if the theme has support to support truncation.

1 Like

Here’s the documentation on how to do it with Tiny theme.