Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create multi-page website with one org-mode file

When exporting an org file to html, it appears that one org file translates to one html file. Is it possible to have certain headings export as a separate file, so that we end up with a main page and a number of sub-pages, all from one org file? For example, the Org Guide looks like it could logically be laid out in a single file.

like image 897
Anthony Avatar asked Apr 17 '13 01:04

Anthony


People also ask

What is an Org mode file?

Org-mode (also: Org mode; /ˈɔːrɡ moʊd/) is a document editing, formatting, and organizing mode, designed for notes, planning, and authoring within the free software text editor Emacs.

What can you do with Org mode?

Org mode is routinely used to build and manage complex workflows. It does this using an elegantly simple syntax that scales from basic markup to full LaTeX typesetting and from plain text notes to literate programs. Everything you need to get started is demonstrated in the example.


2 Answers

If you are still looking for a solution (after 5 years), and you are open to using Hugo for static site generation, ox-hugo is an option.

ox-hugo is an Org exporter backend that exports Org files to Hugo-compatible Markdown files with front-matter. The content can be organized so that you can export the Org subtrees as separate content files, or just have one Org file for each exported file, or you can have a mix of that.

If you look at the above linked ox-hugo site, it is generated from a single Org file; you will find the Org source linked in the footer of that site.

Disclaimer: I am the ox-hugo author.

like image 57
Kaushal Modi Avatar answered Oct 04 '22 06:10

Kaushal Modi


Yes, it is possible. But, no, the current (8.0.x) HTML exporter does not have a capability to generate multiple files.

One way to do it is to generate a texi file with the texinfo exporter, then convert the texi file to html with makeinfo --html. As the Org Guide seems to be generated by this way.

like image 27
Yasushi Shoji Avatar answered Oct 04 '22 06:10

Yasushi Shoji