Open ticky opened 5 years ago
Could you clarify what is the negative impact of having references in the excerpt? In theory, the reference will go away when converted to HTML and all you'll get are viable links.
And looking at #188, it appears that the relevant markdown processors only support references in specific locations.
Given that this is used for the RSS feed, it doesn’t seem useful to have references, which are not linked to by the text, as the opening text in the preview.
What if the opening text has links? I'm assuming that is what the previous PR is trying to address.
Also, excerpts can be used on index pages (can't remember if I actually use excerpt
or description
).
Could you clarify what is the negative impact of having references in the excerpt?
In the case of the RSS feed, they seem extraneous, given that the point of having an excerpt seems to be to give a small bit of the article, and not show the full context.
In theory, the reference will go away when converted to HTML and all you'll get are viable links.
Yes, you end up with a bunch of extra HTML code in your RSS feed, which, again, may not even be referred to in the excerpt.
This post:
---
layout: post.html
title: Example of post with extraneous RSS references
published_date: 2019-03-14 16:25:00 -0800
---
This is a post where I would expect the first paragraph, in its entirety, to be what comes out in the RSS feed.
I have several[^1] references I refer to in latter paragraphs[^2].
[^1]: Here's one!
[^2]: I wouldn't expect these to be in the abstract, as they're not referred to by anything which should show up in it!
Produces this in the RSS feed:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<item>
<title>Example of post with extraneous RSS references</title>
<link>http://localhost:3000/blog/2019/03/14/example-of-post-with-extraneous-rss-references/</link>
<description>
<![CDATA[<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Here's one!
<sup class="footnote-reference"><a href="#2">2</a></sup>: I wouldn't expect these to be in the abstract, as they're not referred to by anything which should show up in it!
This is a post where I would expect the first paragraph, in its entirety, to be what comes out in the RSS feed.</p>
</div>
]]>
</description>
<guid>http://localhost:3000/blog/2019/03/14/example-of-post-with-extraneous-rss-references/</guid>
<pubDate>Thu, 14 Mar 2019 16:25:00 -0800</pubDate>
</item>
</channel>
</rss>
Putting the same post (with metadata tweaked to suit Jekyll) through Jekyll produces this as the excerpt content:
<description><p>This is a post where I would expect the first paragraph, in its entirety, to be what comes out in the RSS feed.</p>
</description>
Also, excerpts can be used on index pages (can't remember if I actually use
excerpt
ordescription
).
Would you expect a block of them to show up in this blog index? Would you be cool with it if, like in the above example post, they were at the start of the excerpt, and not referred to by the excerpt at all?
Thank you for your detailed post! It clarified for me that I misunderstood. I was not aware of footnote support and so I thought you were talking about out-of-line links. I suspect the person who did the PR made the same mistake. It seems like it'd b relatively easy to update the regex to not capture footnotes. I might not be able to get to this right away but I could provide guidance if you have the opportunity to adjust it.
FWIW, for me this is a blocker for migrating a footnotes-using blog to Cobalt. It's not very visible in development but it's still a major bug for RSS users :cry:
How complicated do we think that the fix would be? Full disclosure: I have no Rust experience at all, but if it's just a regex issue, I might be able to help.
It appears that #188 caused all footnotes/references in a document to be hoisted to be at the start of the description, including those not referenced in the excerpt paragraph.
This appears to not match the behaviour of Jekyll, which instead copies references to the end of the excerpt. In my case them being present in the excerpt at all is undesirable, but them being at the end feels more reasonable.
Given that this is used for the RSS feed, it doesn’t seem useful to have references, which are not linked to by the text, as the opening text in the preview.