This Sphinx extension by Xsolla Backend [XBE] automates the management of multiple documentation repositories as part of building a larger, unified documentation system. It facilitates multi-threaded cloning and updating of external repositories specified in a YAML manifest file before Sphinx builds.
Reason this release was yanked:
Malformed Metadata
Project description
Sphinx Extension: Repository Manager
About
This Sphinx extension by Xsolla Backend (XBE) automates the management of multiple documentation repositories as part of building a larger, unified documentation system. It facilitates multi-threaded cloning and updating of external repositories specified in a YAML manifest file before Sphinx builds.
📜 See the Xsolla Backend (XBE) source code and demo production site heavily making use of this extension. Here, you may also find tips for how to utilize this extension to its greatest capabilities.
Getting Started
- Copy the
templates/repo_manifest.template.ymlto a projectdocs/repo_manifest.yml. - Ensure each repository listed in the manifest minimally includes a
url. - Ensure the prerequisites (below) are met, such as having a Python env with
make. - Within
docs/-> Open terminal andmake html.
(!) If editing the manifest, delete your docs/source/_repos-available and docs/source/content dirs to wipe cache
How it Works
repo_manifest.ymllists repositories with their respective clone URLs [and optional rules].docs/source/creates_repos-available(src repos) andcontent(symlinked) dirs.- Upon running
sphinx-build(commonly viamake html), the extension either clones or updates each repo defined within the manifest. - Source clones will sparse checkout and symlink to the
contentdir, allowing for flexibility such as custom entry points and custom names (such as for shorter url slugs). - All repos in the manifest will be organized in a monolithic doc.
💡 If you want to store local content (eg, static .rst), add it to source/_source_docs/
💡 The only RST file expected for your monolithic repo is the index.rst file (next to your conf.py), which can
simply be an include or
toctree
directive to your symlinked docs/source/content/*.rst.
⌛ 5 local workers (default) will take only ~50s to process 30 repos with default manifest settings
Demo
If you cloned this repo (rather than just using it as a sphinx extension), see docs/
for a ready-to-go template! We recommend you move docs/ to a separate repo after testing, leaving this extension
to simply be imported.
After prerequisite setup, simply make html within docs/ -> the manifest is setup to pull a sample doc repo
at templates/.
Prerequisites
Required
This guide assumes you have a basic understanding of Sphinx and RST
Python
Ensure Python >= 3.10 is installed
Unlock Max Char Paths
Note: As a repo manager, there may be deeply-nested directories and may need to unlock the 256-char limit in some envs
With elevated privileges:
requirements.txt
Add the following:
# Sphinx Repo Manager by Xsolla Backend (XBE)
git+https://source.goxbe.io/Core/docs/sphinx_repo_manager.git#egg=sphinx_repo_manager
💡 This will later be available via PyPi
Then install: pip install -r requirements.txt
conf.py
Add the extension (already within docs/):
extensions = [
"sphinx_repo_manager", # Xsolla Backend (XBE)'s extension to manage repos via repo_manifest.yml
]
Optional
[Optional] Auth Token
Using a git host auth token? Copy docs/.env.template -> to docs/.env, then minimally set REPO_AUTH_TOKEN.
💡 Deploying to RTD? Don't forget to dupe these .env vals to your RTD project settings!
[Optional] Doxygen Support
Want to build API docs from OpenAPI? We natively support that! Docs coming soon.
💡 Can't wait? Check out our xbe_static_docs repo for integration examples
Build Requirements
Build requirements for sphinx-build falls outside the scope of this guide. However, some high-level instructions follow:
- If Windows, install
make; perhaps with choco - Remember to
pip install -r requirements.txtwithindocs/beforemake html. - Our xbe_static_docs repo contains containerized Docker examples and tooling to expand upon building.
Tested in
- Windows 11 via PowerShell 7
- Windows 11 via WSL2 (bash)
- Ubuntu 22.04 via ReadTheDocs (RTD) CI
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_repo_manager-1.0.6.tar.gz.
File metadata
- Download URL: sphinx_repo_manager-1.0.6.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27e57d8b86f45ecebf3d72fd34c5264e0bbf9abf1ce632c70aeea0871f9469b6
|
|
| MD5 |
580e80f5548d9986ed15d56cac0adb2d
|
|
| BLAKE2b-256 |
004dc227b3398e98222f306ca09b5d6f5fa4536ad4c3adfefde24e73fa4de92d
|
File details
Details for the file sphinx_repo_manager-1.0.6-py3-none-any.whl.
File metadata
- Download URL: sphinx_repo_manager-1.0.6-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17414b81093efe848a66684d93eb81b60d1d9d96d9f93e8a51d84855995045ee
|
|
| MD5 |
0ef69f3bff73314d1aeb4b3877e74723
|
|
| BLAKE2b-256 |
3c0a447c1cf9d5299aa5280e93569411b0614162a72223eec292dda1d16a26c7
|