Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A better excerpt field method #327

yoanmalie opened this issue Jun 18, 2019 · 0 comments


1 participant
Copy link

commented Jun 18, 2019

The Kirby 2 excerpt included a 'words' option, who doesn't worked well as expected sometime. But it was there.
The K3 excerpt was rewritten and give the same simple string cutting and totally abandonned the "words" option.

Here my suggestions for a better and powered excerpt. Addittion are welcome:

  • Keep the simple way by cutting the string at xx characters, no matters what;
  • Same but without cutting the last word;
  • Cut the string at xx words, without cutting the last word;
  • A Kirby option to choose the default suffix. (The ellepsis … is set by default);
  • Still be able to change the suffix while calling excerpt on a field method on the fly;
  • Strip HTML or not - Which ones to keep/delete (Like avoid Hn, blockquote…).

Maybe just one excerpt method is not enought to contain all theses options and we need to think about an other one to differenciate the characters excerpt and the words one.

@bastianallgeier bastianallgeier added this to Backlog in Roadmap Jul 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.