You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that when including a table of contents with a line like the following:
#+TOC: headlines 2
The resulting HTML includes unique org links (of the form #org865011c) rather then the cleaned-up :CUSTOM_ID values that get inserted as part of the weblorg--parse-org advice overrides.
I've managed to get it working by adding another advice-add in the function that does something like this:
(advice-add#'org-html--reference:around
(lambda(fndatuminfo&optionalnamed-only)
(if (and
(memq (org-element-type datum) '(headline))
(not (org-element-property :CUSTOM_ID datum)))
(if-let ((headline-slug (weblorg--slugify (org-element-property :raw-value datum))))
(org-element-put-property datum :CUSTOM_ID headline-slug)))
(funcall fn datum info named-only)))
So I think that something like it will probably reliably work. I can either upstream something cleaner, or if somebody knows more about what they're doing than I do (😅 ) then that's great too.
The text was updated successfully, but these errors were encountered:
Hi! Thanks so much for weblorg. ❤
I've found that when including a table of contents with a line like the following:
The resulting HTML includes unique org links (of the form
#org865011c
) rather then the cleaned-up:CUSTOM_ID
values that get inserted as part of theweblorg--parse-org
advice overrides.I've managed to get it working by adding another
advice-add
in the function that does something like this:So I think that something like it will probably reliably work. I can either upstream something cleaner, or if somebody knows more about what they're doing than I do (😅 ) then that's great too.
The text was updated successfully, but these errors were encountered: