Hello everyone, I want to limit excerpt/summary/description words that appear when you post new article.
For example I want to limit to 10 words, so it will appear only I once encountered this following problem while trying to install, I tried tinkering around the code and zola documentation page to no avail, can anyone help me ?
I once encountered this following problem while trying to install
I’m using Mabuya theme
Hi Liso, are you talking about when you use the summary variable on pages?
summary
Here are the docs on that. You should be to limit it to by placing <!-- more --> in your markdown content.
<!-- more -->
If you want to programmatically limit it to the first ten words then you’ll have to do something like
{% set excerpt = page.summary | split(pat=" ") | slice(end=10) %}
I didn’t test that code but you should be able to modify it to suit your needs.