1

The HTML export of an org file transforms the links to "to equivalent HTML links in the output"

How can I suppress this? I want to keep the same link names.

Example: If we have this org file.

** section 1
This is important. 
<<important>>
** section 2
As we have seen in [[important]] ...

We get after the html export something like this:

<h2 id="org12cde62"><span class="section-number-2">1</span> section 1</h2>
<div class="outline-text-2" id="text-1">
<p>
This is important.
<a id="orgcfaef91"></a>
</p>
</div>
</div>
<div id="outline-container-org3491d62" class="outline-2">
<h2 id="org3491d62"><span class="section-number-2">2</span> section 2</h2>
<div class="outline-text-2" id="text-2">
<p>
As we have seen in <a href="#orgcfaef91">1</a>
</p>
</div>
</div>

So the export has transformed 'important' into 'orgcfaef91'.

I need the old link name ('important') in the html file. How to get this?

Are there problems I don't see -- that org-mode has this setting (transforming the id's) ?

rl1
  • 346
  • 1
  • 16
  • Why do you care what the href is going to be named? Nobody will see that. E.g. what would you expect to happen if you had two links that were named `important`? The exporter is trying to disambiguate things while preserving the structure. – NickD Dec 09 '19 at 13:06
  • 1
    Because It's better if I want to give a link to a special section, someting like `..../thefile.html#important`. – rl1 Dec 09 '19 at 14:47
  • 1
    Seems like org is doing more work than it should here. The links will only need disambiguation if the source org file has more than one dedicated target with the same name. If that's true, how will the exporter know which link goes with which target? – Tyler Dec 09 '19 at 15:16
  • 1
    It's actually not doing any more than necessary: I was wrong. It just finds the first radio link that matches: any others are ignored. In answer to the OP's comment: if you want to reference sections by name, I think you need to define a CUSTOM_ID property for each section. – NickD Dec 10 '19 at 02:23
  • Yes, with the CUSTOM_ID property it works! – rl1 Dec 23 '19 at 17:38
  • Unfortunately I didn't find this befor I posted my question: https://emacs.stackexchange.com/questions/614/creating-permalinks-for-sections-in-html-exported-from-org-mode – rl1 Dec 23 '19 at 18:49

0 Answers0