Closed JPTeasdale closed 6 years ago
Hmm I guess this has a problem since you don't know if there is going to be an other_doc_2.rst that also includes other_doc_includes/other_doc_part1.rst
The only way I can see for one to properly take on some level of page hierarchy support is to rely on Sphinx's toctree markup (please, correct me if I'm wrong). I do not believe this extension should be defining an elaborate hierarchy configuration (i.e. mapping per-page structure) or custom Sphinx markups in order to support some level of page hierarchy (while I don't think this was proposed, I'd rather explicitly rule it out now).
Taking a look at toctree
, a capability could be added to that from a master_doc
page and a defined toctree
(and nested toctree
markups), one could provide some level of page hierarchy support. For example, using Kernel documentation as an example, there could be a mapping such as:
Some other points to consider:
master_doc
defined; and,toctree
.toctree
should be siblings or children of the nested page.Would be nice to see this utilize the confluence 'children display' and/or TOC macros.
@JPTeasdale, I was finally able to look at your PR (#38; well, a part of it so far). I wanted to make a series of internal changes first with publishing (specifically, with the order of publisher) before trying to take in your changes. I basically copied/modified your contributions (at least for the hierarchy mode support for now) in the following (temporary commits):
If you wish to make comments on these changes, please feel free to. Note that these commits are part of a forgotten-autumn branch which will most likely be re-based in the future. Hopefully I'll be able to look at adding the unit test work you've done for this feature as well as looking at the max depth capability as well.
@spyoungtech, good idea! I'll take a look to see how easy this can be done. I'd be nice to (maybe) even apply the maxdepth
markup value to the macro's depth
attribute.
@spyoungtech, fyi
This work should be completed with the changes from PR #70 (specifically, see 9d0dda592a9aabc10634019eb9842eccf705a8ae). The changes are currently available in master
and should be made available for next release.
To take advantage of the feature, use the configuration options confluence_max_doc_depth
and confluence_page_hierarchy
.
@JPTeasdale, thanks for the initial changes/pull requests. Hopefully the feature works as expected. Any issues experienced from using this feature, please make a new issue to cover the specific issue. I'll mark this issue has closed.
If you have a page hierarchy like so:
The uploader does not preserve the page hierarchy as expected and instead creates four documents at the root of the space.