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

Improve footnote references #314

merged 2 commits into from Nov 25, 2019

Improve footnote references #314

merged 2 commits into from Nov 25, 2019


Copy link

fluffy-critter commented Nov 25, 2019


Improve footnote references for entry.body vs. entry.more; fixes #269

Detailed description

This adds two parameters to entry.body/.more, footnotes_defer and footnotes_link, which indicates whether footnote rendering should be deferred for later, and where a footnote's link reference should point to.

In entry.body it defaults to footnotes_defer=True and the link pointing to the URL of the entry.

In entry.more it defaults to footnotes_defer=False, and the link is empty if we're not in an absolute context, or will be the absolute link of the entry if we are in an absolute context.

This also makes the link reference and definition IDs unique on a per-entry basis, so they won't interfere with each other on an index page or the like.

Developer/user impact

This will behave weirdly if entry.body and entry.more are used multiple times in a single template.

Test plan

See tests/content/, which behaves as expected from the index, the individual entry, and from the feed template.

Got a site to show off?

@fluffy-critter fluffy-critter changed the title Feature/269 footnote refs Improve footnote references Nov 25, 2019
@fluffy-critter fluffy-critter merged commit 62eedc9 into master Nov 25, 2019
@fluffy-critter fluffy-critter deleted the feature/269-footnote-refs branch Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.