I am not the author of this library, but I've found it to be incredibly useful putting together documentation for GitHub/GitLab repos. If you're working with JavaScript, this library combines really nicely with jsdoc-to-markdown [1] to completely automate API documentation in the README.md (see [2] for an example).
$ for f in main.rst include1.rst include1.1.rst; do
echo "$f"
cat "$f"
done
main.rst
==================================
Demo of RestructuredText inclusion
==================================
.. contents::
First include a file
====================
.. include:: include1.rst
include1.rst
This is the first included file
-------------------------------
Which includes another file.
.. include:: include1.1.rst
include1.1.rst
And this is the last included file
..................................
Fin.
$ lynx --dump main.html
Demo of RestructuredText inclusion
Contents
* [1]First include a file
+ [2]This is the first included file
o [3]And this is the last included file
[4]First include a file
[5]This is the first included file
Which includes another file.
[6]And this is the last included file
Fin.
References
1. file:///home/aaron/tmp/main.html#first-include-a-file
2. file:///home/aaron/tmp/main.html#this-is-the-first-included-file
3. file:///home/aaron/tmp/main.html#and-this-is-the-last-included-file
4. file:///home/aaron/tmp/main.html#id1
5. file:///home/aaron/tmp/main.html#id2
6. file:///home/aaron/tmp/main.html#id3
2 comments
[ 2.8 ms ] story [ 14.9 ms ] thread[1] https://github.com/jsdoc2md/jsdoc-to-markdown
[2] https://github.com/sparkeditor/piece-table
http://docutils.sourceforge.net/docs/ref/rst/directives.html...