[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extract toc from org file
From: |
reza |
Subject: |
Re: Extract toc from org file |
Date: |
Tue, 27 Sep 2022 08:19:08 +0000 |
> You just need a custom :sitemap-function.
> The default `org-publish-sitemap-default' flattens the hierarchy.
>
> From the manual:
>
> ‘:sitemap-function’
> Plug-in function to use for generation of the sitemap. It is
> called with two arguments: the title of the site-map and a
> representation of the files and directories involved in the project
> as a nested list, which can further be transformed using
> ‘org-list-to-generic’, ‘org-list-to-subtree’ and alike. Default
> value generates a plain list of links to all files in the project.
>
> You may create a function similar to `org-publish-sitemap-default' but
> using `org-list-to-subtree' instead of `org-list-to-org'
Thanks for the pointers, but I can't figure out how to get from there to
a toc? As I understand, `list' is a list of files from my project and
`org-list-to-subtree' does add stars to this list. But how do I get all
sections and subsections from my file to appear here?
OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys
OpenPGP_signature
Description: PGP signature
Re: Extract toc from org file, Ihor Radchenko, 2022/09/26