Changing excerpt length

It’s very nice! Can I somehow limit the number of characters in an excerpt?

There is a site setting in discourse topic_excerpt_maxlength . IIRC this will only apply to new topics - if you want to apply the change to existing topics you will need to ‘rebake’ them.

2 Likes

Thanks, How i can ‘rebake’ them?

This command don’t help me:

$ cd /var/discourse
$ ./launcher enter app
$ rake posts:rebake

What happened? Did it show an error?

Change in site settings:

No erros:

# cd /var/discourse
# ./launcher enter app
# rake posts:rebake
Rebaking post markdown for 'default'
     4805 / 4805 (100.0%)
4805 posts done!

And the excerpts are still more than 100 characters? Is the change working for new topics?

More 100 characters now, but in settings 100:

Don’t working for new topics too

How to solve this problem? Any ideas?

Is this the right setting? I noticed my excerpts are as long as 300 characters, which is the default setting for post excerpt maxlength.

I have not been able to get this change to work.

I am looking to change the length of the preview excerpt when someone on my forum pastes a link to another topic on my forum. Basically, the length of this (only for posts within my forum):

Right now, the preview is very long (400 characters). I have tried changing both the “post_excerpt_maxlength” setting, as well as the “topic_excerpt_maxlength” setting. Neither made a difference for this–including for new topics created after the setting was changed.

How can I adjust this setting to make the previews shorter when I link to another post on my forum?

1 Like