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

[orgmode] Fragment Identifier Stripped from Links #446

Open
Xaldew opened this issue Oct 27, 2024 · 0 comments
Open

[orgmode] Fragment Identifier Stripped from Links #446

Xaldew opened this issue Oct 27, 2024 · 0 comments

Comments

@Xaldew
Copy link

Xaldew commented Oct 27, 2024

Given the following org-mode test post:

#+BEGIN_COMMENT
.. title: Test
.. slug: test
.. date: 2024-10-27 15:54:05 UTC+02:00
.. tags:
.. category:
.. link:
.. description:
.. type: text

#+END_COMMENT

* Introduction

Test link: [[link:/pages/publications/#pub0][Test]].

When this is exported converted/exported to HTML, the fragment identifier (#pub0 above) is removed from the link. As far as I have been able to tell, creating the 'partial' HTML file directly from Emacs works fine, and contains the correct HTML link:

<div id="outline-container-org9106939" class="outline-2">
<h2 id="org9106939">Introduction</h2>
<div class="outline-text-2" id="text-org9106939">
<p>
Test link: <a href="link:/pages/publications/#pub0">Test</a>.
</p>
</div>
</div>

Thus, I don't think anything is wrong with the plugin itself, but there could be some machinery I'm missing. Does Nikola perform any other kind of fix-ups on the <a> tags after a plugin is done with it that may strip out the fragments?

Also, is there some way to retrieve the partial HTML generated by the plugin before they're converted to full HTML pages in the output directory? That would help immensely with debugging this

For reference, the snippet generated by Nikola + the org-mode plugin is this:

    <div id="outline-container-org41a0786" class="outline-2">
<h2 id="org41a0786">Introduction</h2>
<div class="outline-text-2" id="text-org41a0786">
<p>
Test link: <a href="/pages/publications/">Test</a>.
</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant