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

More configurable post excerpt #42

Open
mikasjp opened this issue Apr 28, 2020 · 2 comments
Open

More configurable post excerpt #42

mikasjp opened this issue Apr 28, 2020 · 2 comments

Comments

@mikasjp
Copy link

mikasjp commented Apr 28, 2020

The user should be able to:

  • specify whether the excerpt should end with the Read more link and its label,
  • configure excerpts length
@samarsault
Copy link
Owner

You can use jekyll's excerpt_separator property to do this.
https://jekyllrb.com/docs/posts/#post-excerpts

@DotIN13
Copy link
Contributor

DotIN13 commented May 27, 2020

For read more links you can check out my answer at #56

For exerpt length, alternative to excerpt_separator, you could define universal length with liquid tag truncate.

For example in _layout/home.html: 52, edit as follows

{{ post.excerpt | truncate: 50 }}

Then you will get all exerpts truncated to 50 characters, though it may not work well with English as you may get words cut in half at the end of the excerpt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants