Earl Chase <[email protected]> writes: > Le sam. 25 juil. 2026 à 10:32, Ihor Radchenko <[email protected]> a écrit : >> >> Earl Chase <[email protected]> writes: >> >> > etc/ORG-NEWS | 21 +++ >> > lisp/ox-html.el | 55 +++++--- >> > testing/lisp/test-ox-html.el | 241 +++++++++++++++++++++++++++++++++++ >> >> I think we should also document the new option in the manual. >> > > Done.
Also, update the commit message. >> Mutating INFO can cause unintended side effects. >> Rather than trying to change INFO + calling >> org-publish-file-relative-name, we should factor out >> org-publish-file-relative-name into a more global function (in ox.el) >> and use it from ox-html and ox-publish. >> I imagine that function to look like >> >> (org-export-file-relative-name-maybe filename base-directory) >> >> > + (file-relative-name (org-publish-file-relative-name >> > + raw-path updated-info)) >> > + (home (and (plist-get info :html-link-home) >> > + (org-trim (plist-get info :html-link-home))))) >> > + ;; Possibly append `:html-link-home' to relative file >> > + ;; name. >> > > Done. Any reason you went with org-publish-*? > +#+vindex: org-html-base-directory > +~org-html-base-directory~ can be used to set the directory of > +the project that you intend to export. When used in conjunction > +with ~org-html-link-home~ and ~org-html-link-use-abs-url~, file > +links to files in ~org-html-base-directory~ will have the value > +of ~org-html-link-home~ prepended to them. For example, when > +~org-html-base-directory~ is set to =~/my/project=, ~org-html-link-home~ > +is set to =https://orgmode.org= and ~org-html-link-use-abs-url~ is set to > ~t~, > +~[[~/my/project/contribute][Contributing to Org]]~ will be exported as I just realized that here an elsewhere you document this as a custom option, while it is export option, that can be set both via variable and also in-buffer keyword. > +(defcustom org-html-base-directory nil > + "Directory of the project that you intend to export. > +This variable is the equivalent of the `:base-directory' > +key of `org-publish-project-alist'. If `:base-directory' > +is also set, the value of this variable will be ignored." > + :group 'org-export-html > + :package-version '(Org . "10.0") > + :safe #'stringp string-or-null-p > + :type 'string) Or nil. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
