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
page.excerpt behaviour changed between 4.0.1 and 4.1.0 #8216
Comments
Is your site public @seth-reeser ? If yes, please provide us with a link to it. |
@ashmaroli, unfortunately I cannot share the website publicly, but here's another example. The below snippet loops through each Jekyll page and generates a Given a page, in this example, a "Terms of Use" page that has no Before (Jekyll 4.0.1): After (Jekyll 4.1.0): |
The reason I asked for a link to your website is so that I could see how exactly As a workaround to get to the old behavior, you can disable # _config.yml
defaults:
- scope:
path: ""
type: pages
values:
excerpt_separator: "" |
Here's before and after for the original meta description example. Keep in mind for this example, that there was no
Before (Jekyll 4.0.1) After (Jekyll 4.1.0) new Jekyll logic now creates a Thank you for the |
Hello, version 4.1.0 introduced an unexpected change in behaviour for
page.excerpt
per pull request 7642.I was using page.excerpt as a meta description entry:
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
In an example of an excerpt not being defined for a page, this would have evaluated to the site.description, but now I'm getting markup generated for me that breaks because of HTML being included.
I would recommend the new implementation approach things similarly by stripping html, stripping newlines, and even maybe truncating.
The text was updated successfully, but these errors were encountered: