Hello, Ruben Maher <r...@rkm.id.au> writes:
> I've been working on a derived exporter to publish a static blog, and > I've run into some issues. Say that `:publishing-directory' is > "~/public_html" and I have `:base-directory' with an Org file foo.org. > > foo.org has option keywords like this: > > #+title: foo.org > #+date: <2015-07-25 Sat 17:21:41> > > > My derived exporter visits each Org file to get information from the > keywords, and would export foo.org like so: foo.org -> > ~/public_html/2015/07/25/foo/index.html, using something like > > > #+begin_src elisp > (let ((pub-dir > (file-name-as-directory > (concat (expand-file-name pub-dir) > (format-time-string "%Y/%m/%d/" date) > (file-name-base filename))))) > (org-publish-org-to > 'rkm-html filename > (concat "." (or (plist-get plist :html-extension) > org-html-extension "html")) > (org-combine-plists plist '(:output-file "index")) pub-dir)) > #+end_src Can't you simply use org-publish-after-publishing-hook to copy the published file elsewhere? Or, if you write your own exporter, do it à la "ox-latex.el", i.e., publish in :base-directory and move it elsewhere with `org-publish-attachment'? > > I have achieved this using the attached diff, which tells > `org-export-output-file-name' to respect the property `:output-file' in > the communications channel. This doesn't sound right: if you know the file name beforehand, you don't need to call `org-export-output-file-name' in the first place. Regards, -- Nicolas Goaziou