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

Links to footnotes appear to be broken #41

Closed
EricDuminil opened this issue Feb 9, 2021 · 2 comments
Closed

Links to footnotes appear to be broken #41

EricDuminil opened this issue Feb 9, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@EricDuminil
Copy link

Links to footnotes appear to be broken when rendered with mkdocs-print-site-plugin.

For example, the 1 & 2 footnotes in "Lorem ipsum dolor sit amet, consectetur adipiscing elit" on the example page link to

https://timvink.github.io/mkdocs-print-site-plugin/print_page.html#demo_content-fn:1
and
https://timvink.github.io/mkdocs-print-site-plugin/print_page.html#demo_content-fn:2

But those links do not resolve.

@timvink timvink added the bug Something isn't working label Feb 9, 2021
@timvink
Copy link
Owner

timvink commented Feb 9, 2021

Thanks for reporting! Indeed an edge case, I will address it in next release. Feel free to submit a PR if you need a fix quickly.

timvink added a commit that referenced this issue Feb 22, 2021
@timvink
Copy link
Owner

timvink commented Feb 22, 2021

Digging into this. This is how the footnotes link properly in the demo page itself:

<sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup>
<li id="fn:1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.&nbsp;<a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"></a></p>
</li>

On the print site page, only part of these links are updated, resulting in broken links.

<sup id="fnref:1">
    <a class="footnote-ref" href="#demo_content-fn:1">1</a>
</sup>
<li id="fn:1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.&nbsp;<a class="footnote-backref" href="#demo_content-fnref:1" title="Jump back to footnote 1 in the text"></a></p>
</li>

The cause was that I did not update the sup and li tags. Fixed now in v.1.1 https://github.com/timvink/mkdocs-print-site-plugin/releases

@timvink timvink closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants