How do you save a publishing behavior so that only a single org file out of a directory of org files is published?
org-publish-file could be used with a larger unused project definition, but content could be published unintentionally.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
This was non-obvious and the scenario of single/select files wasn't mentioned in any documentation specifically, so here's my solution: (only the last two lines are relevant)
(setq org-publish-project-alist `(("project" :base-directory "~/org/" :publishing-function org-html-publish-to-html :publishing-directory "~/html_pub/" :exclude ".*" :include ["project.org"])))
(specify the parent directory, exclude all files, and explicitly include the file(s) which you intend to publish)