From: inkbottle <inkbottle007@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-id with ox-html
Date: Sat, 14 Aug 2021 02:50:46 +0200 [thread overview]
Message-ID: <125302989.LfU6mLQhtn@pluto> (raw)
In-Reply-To: <4617246.m1MCmUpgFQ@pluto>
Just adding one element. When I open `theindex.inc` in emacs, then do `M-x
org-mode`, then go on one of the links and do `M-x org-open-at-point`, the
link is correctly followed.
But when exported to html, the link from `theindex.html` is broken, because no
target has been actually created using
:PROPERTIES:
:ID: 9ca0bb24-407e-4d23-863b-b3ff8afb90db
:END:
Instead, I only have a target:
`<h2 id="org1ddafea">`
in `misc.html`, for the considered headline.
It's correct that I do not _need_ a target named after
`9ca0bb24-407e-4d23-863b-b3ff8afb90db`,
But I do need the link and the target to agree.
On Saturday, August 14, 2021 12:28:35 AM CEST you wrote:
> Hi,
>
> 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
> (progn
> (use-package org-id)
> (setq org-id-link-to-org-use-id t)
> ;; (setq org-html-link-org-files-as-html nil)
> (setq org-publish-project-alist
> '(("project-name"
> :base-directory "~/note_taking"
> :publishing-directory "~/note_taking/html"
> :publishing-function org-html-publish-to-html
> :makeindex t)
>
> ("all" :components ("project-name")
> ))))
> #+end_src
>
> then `C-c C-e P a`
>
> At this point I have both `misc.html` and `theindex.html` created,
> `theindex.html`.
>
> 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?
> >>>
> >>> Like
> >>>
> >>> <h2 id="sec-2"> HEADLINE
> >>>
> >>> <span class="org-id" id="THE-ORG-ID-ITSELF">THE-ORG-ID-ITSELF</
> >>>
> >>> span>
> >>>
> >>> </h2>
> >>>
> >>> 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:
>
> https://karl-voit.at/2019/11/16/UOMF-Linking-Headings/
> https://lists.gnu.org/archive/html/emacs-orgmode/2016-12/msg00423.html
>
>
> 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 html?
>
> Thanks,
> Chris
next prev parent reply other threads:[~2021-08-14 0:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 22:28 org-id with ox-html inkbottle
2021-08-14 0:50 ` inkbottle [this message]
2021-08-14 4:20 ` inkbottle
2021-08-17 3:11 ` Internal link broken when publishing (was org-id with ox-html) inkbottle
2021-08-22 20:42 ` inkbottle
2021-08-24 15:23 ` Maxim Nikulin
2021-09-07 15:46 ` chris
2021-09-14 16:33 ` Max Nikulin
2021-09-20 0:05 ` chris
2021-09-20 14:13 ` Max Nikulin
2021-09-20 15:26 ` chris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=125302989.LfU6mLQhtn@pluto \
--to=inkbottle007@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).