-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add "html_excerpts" flag to allow Atom <summary> tags to contain HTML #397
base: master
Are you sure you want to change the base?
Commits on Nov 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8066691 - Browse repository at this point
Copy the full SHA 8066691View commit details -
Added test to verify that whitespace is normalized in post summaries
The test checks this by verifying that the newlines in the "pre" post are converted to spaces.
Configuration menu - View commit details
-
Copy full SHA for a43cf11 - Browse repository at this point
Copy the full SHA a43cf11View commit details -
Add "html_summaries" option to allow summaries to output as full HTML
This allows posts with autogenerated excerpts (that may have images or HTML in them) to keep that HTML intact in the summary portion of the Atom feed. The default remains as having the HTML be stripped and the whitespace normalized. This has some benefits, because the default value for a post excerpt is for it to be the entire first paragraph of each post. It's not unheard of for it to have plenty of HTML formatting and other tags. In [my site][1], for example, post excerpts often have images, and I'd very much prefer keeping those images intact in the feed, even if using `excerpt_only` feed generation. Note that this passes the W3C validator with no warnings, since feed.xml already uses `type="html"` in its `<summary>` tags. [1]: https://www.kronopath.com/blog/
Configuration menu - View commit details
-
Copy full SHA for 4776be2 - Browse repository at this point
Copy the full SHA 4776be2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 080ee6d - Browse repository at this point
Copy the full SHA 080ee6dView commit details -
Rename the flag to html_excerpts
This naming is more consistent with the "excerpts_only" flag, though it may be slightly more confusing given that this also applies to the post's "description" option. Still, consistency is key.
Configuration menu - View commit details
-
Copy full SHA for a30e2a5 - Browse repository at this point
Copy the full SHA a30e2a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf21400 - Browse repository at this point
Copy the full SHA bf21400View commit details -
Attempt to fix tests that are failing due to incorrect post being tested
Apparently some of the test cases are failing because instead of the "pre" post being tested, it's instead picking up the "liquid" post from just before it. I suspect that this might be happening because the test machines are maybe configured with a date and time before 2016-04-25, meaning that they don't pick up the "author-reference" post, leading to an off-by-one error. That's my best guess, anyway. It's not the most robust answer, since it would also likely mean that in these machines the "puts the latest 2 the posts in the feed.xml file" test would also fail. So maybe I'm wrong. Still, to try to fix this, instead of counting the posts from the most recent, the test now instead counts from the oldest, which should hopefully be more robust to this issue.
Configuration menu - View commit details
-
Copy full SHA for 3e6d512 - Browse repository at this point
Copy the full SHA 3e6d512View commit details
Commits on Nov 16, 2023
-
In tests, search for post by title instead of by index
Apparently the indices just aren't consistent on jekyll-feed's test machines. Neither `feed.items[3]` nor `feed.items[-7]` can be reliably said to be the "pre" post which I use for testing in this PR. Instead, let's just search through all the posts for whichever one is titled "Pre" and test against that one.
Configuration menu - View commit details
-
Copy full SHA for 9ab43a2 - Browse repository at this point
Copy the full SHA 9ab43a2View commit details