I would like to change the name of the generated html file of all files during an org-publish.

As per the docs: unless EXPORT_FILE_NAME is set, "Org generates the file name based on the buffer name and the extension based on the back-end format". I don't want to set EXPORT_FILE_NAME per file however - I'd like to define a function that determines the filename for all files during publish. (In my case, based on the org file's TITLE property).

For example:

  • my filename might be 20201003123706-commonspub.org
  • the file has the #+TITLE property of CommonsPub.
  • At present my output html file will be called 20201003123706-commonspub.html
  • But I would like to be CommonsPub.html.

I am publishing via org-publish-project-alist with :publishing-function org-html-publish-to-html.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.