[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
org-id with ox-html
org-id with ox-html
Sat, 14 Aug 2021 00:28:35 +0200
I want an `org-id / :ID:` publishing workflow.
To eliminate "xy-case" I first describe what I've been trying to do.
First I've added an `:ID:` to many headlines through `M-x org-id-get-create`.
Then I've added one `#+INDEX: word` under one of those headlines.
Then I've executed that (I do not have org-mode related configuration in my
init.el for now):
#+begin_src emacs-lisp :tangle no
(setq org-id-link-to-org-use-id t)
;; (setq org-html-link-org-files-as-html nil)
("all" :components ("project-name")
then `C-c C-e P a`
At this point I have both `misc.html` and `theindex.html` created,
The links in `theindex.html` are like: `misc.html#ID-9ca0bb24-407e-4d23-863b-
b3ff8afb90db`, as they should, I would say.
There really is: `:ID: 9ca0bb24-407e-4d23-863b-b3ff8afb90db` in `misc.org`.
But it is not translated in `misc.html`. So the link is not working. All the
anchors in `misc.html` are in the form: `<h2 id="org1ddafea">...</h2>`. No
`:ID:` is used.
Oh, and I also did, `M-x org-id-update-id-locations`, in case it would bring
me any luck.
The subject has already been talked about twice at least, but I can't apply or
understand, what have been said.
In https://lists.gnu.org/archive/html/emacs-orgmode/2009-03/msg00012.html, we
can read this, which seems to completely address my question, though I really
don't know how to reproduce it, and I'm not sure it's even possible:
>>> Could the org-id be added when publishing?
>>> <h2 id="sec-2"> HEADLINE
>>> <span class="org-id" id="THE-ORG-ID-ITSELF">THE-ORG-ID-ITSELF</
>>> or similar?
>> They already are in the HTML, I am surprised you never noticed.
> ... because I didn't use IDs in my publishing projects yet :-D
The subject has also been brought up by Karl Voit with different specifications
though. I, myself, am perfectly fine with the default function generating
`:ID:`. The discussion however is very interesting:
Another way to put the question could be:
Is it possible, to have `:ID: 9ca0bb24-407e-4d23-863b-b3ff8afb90db`, translated
into `id="ID-9ca0bb24-407e-4d23-863b-b3ff8afb90db"` (or sth), when exporting to
- org-id with ox-html,