footnotes: background on the feature
[The excerpt/read-more feature] simply truncates the post and renders the markdown
on the initial excerpt. To fix [the lack of footnotes], we’ll need to render the markdown based
on the entire post, truncate it at the
<!--more-->tag, and make sure the footnotes
option in the
writeas/saturdaylibrary is enabled.
goal: outline detail for development
The goal of this thread is just want to expand[^1] on Matt’s thread - hopefully get Matt’s input - on what exactly is needed, maybe even with code pointers.
As a bonus, since this has been unimplemented so long, it might be helpful to add its status to the end-user documentation (there’s both a
howto site and a
guides site - not sure which).
Q1: where does the platform’s markdown logic begin in write.as codebase?
Q2: where does the conflicting feature (“excerpt/more”) begin in write.as codebase?
- A: TBD
Q3(TBD): how to handle above-the-fold footnotes.
I could be mistaken - feel free to correct me. I’m guessing rendering footnotes as-is for excerpt mode would cause link bugs. Seems we’d cause a bug where we’d expose an anchor tag (say from the list view of a blog) with
#fn-1, that doesn’t actually have a corresponding destination ont hat page (the list-view of the blog).
A1: (guessing this is easier) in the “excerpt” rendering, strip the anchor tag from around the super-script of the footnotes.
maybe just render twice instead of truncating?
This approach makes me think Matt’s initial algorithm outline is maybe not what he’d want to go with (why hackily strip out footnotes when you can just render the post twice: once for truncated view, once for full view - the former with the flag not passed in, the latter where the flag is passed in)
- maybe just render twice instead of truncating?
A2: (guessing this is harder) in the “excerpt” rendering, transform the
hrefof the anchor tag to be absolute (eg: instead of being a link like
#fn-1it should be
Not only is this probably more work, but I’m guessing it’s of minimal value, as following a footnote from excerpt-rendering means you’re not fully engaged in the content yet. so my gut say this isn’t the right choice.
- questionable value.
- A1: (guessing this is easier) in the “excerpt” rendering, strip the anchor tag from around the super-script of the footnotes.
Hopefully this’ll be a helpful post. I’ll come back when I have time. Anyone should feel free to implement though I’m not claiming I will just yet.
[^1]: I’m thinking if I ran into such clear instructions, I’d maybe just try to implement it real quick and send the pull request. Maybe this thread will move the ball forward one roll, and let someone else do that.
(Discussion moved from writefreely#338)