Proposal for how to implement the docs reorg proposal #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes in this PR are based on the original docs reorg document.
Understanding what changed compared to the previous setup
Live Preview
The live preview script creates symlinks for the
index
folder and theindex_html.rst
into the build directory.This means that within the
.rst
files in this repository, all canton content can be linked to with/canton
, all SDK content with the respective root level folder, e.g./getting-started
, and all custom index files with/index
.Structure
The staring point is
index_html.rst
. This is where the main structure / top-level menu items are contained.Single level of content
When the doc structure asks for only one level of content, like the Set Up Your Environment section, then the sphinx documents from either Canton or SDK can be linked directly into index_html.rst. See index_html.rst#25-34.
Multiple levels of content
For more than one level of content, like Create Daml Apps, the structure is modeled within this repository as a folder structure containing
index.rst
files.So, for the target structure
the following folder structure is used:
The top-level menu
Create Daml Apps
inindex_html.rst
refers to theindex.rst
files in the sub-folders (e.g. for linking to developer tools), which in turn contain a table of content that points to the already existing pages from the canton or SDK docs (see/index/create-daml-apps/developer-tools/index
.Required Changes in the Canton or SDK docs
Because of how Sphinx renders the menu for the current document, documents should only be linked to from a single
toctree
directive. In case a document that is covered by this example/PoC is already contained in such atoctree
directive, I left a comment in the correspondingindex.rst
file in this repository that it needs to be removed in the original originaltoctree
. See docs/index/create-daml-apps/off-ledger/json-api/index.rst as example.