Search code examples
emacsorg-mode

Org-mode: publishing multiple org files into a single HTML file


I am wondering if it is possible to publish multiple org files into a single (consolidated). So, the first level of the TOC would be each of the file, then subsequent levels would be the TOC of each individual Org file.

I checked the publishing options and I can't see anything. So I am wondering if there would be another option to do that.


Solution

  • I think what you are looking for can be simply accomplished by including the additional org files to your main one. Simply add the following at the start of the file:

    #+INCLUDE: second.org
    #+INCLUDE: third.org
    

    There are some nice additional parameters you can set to for example just include parts of a file, etc. For detailed information, look at the manual 11.4 Include files.