13

Is there a way to export a .org file into an html that supports expanding and collapsing titles?

What I want is to be able to press a key like TAB and expand and collapse the outline, but on a html site.

Github wikis support orgmode but they don't seem to allow expanding and collapsing of titles.

Jason Mirk
  • 713
  • 3
  • 15

1 Answers1

12

What you are looking for is org-info.js, a JavaScript library to be used in conjunction with HTML files generated from Org. This library adds support for folding, navigation, etc.

Take a look at http://orgmode.org/manual/JavaScript-support.html, and the more detailed documentation here: http://orgmode.org/worg/code/org-info-js/.

glucas
  • 20,175
  • 1
  • 51
  • 83
  • 2
    I suggest others don't go down this path. It's not maintained any more and the original author of org-info-js has removed all traces from of the main repo. I tracked down an unminified version `org-info-src.js` if you want to know what to google, but even in it's working state (you need a H1 or it will crash) it's still barely working on modern browsers. – Gerry Aug 19 '21 at 21:06
  • 1
    Good to know, thanks for adding that. – glucas Aug 20 '21 at 00:46