-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: linked mkdocs & api docs (#3703)
This PR will bump docs-v2 to be the main docs dir. All the User Guide content will be hosted on mkdocs and all the API Docs remain on sphinx docs, with relative paths in between. Docs successfully builds on readthedocs. `make docs` will build both docs locally
- Loading branch information
Showing
123 changed files
with
349 additions
and
9,287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
os: "ubuntu-24.04" | ||
tools: | ||
python: '3.10' | ||
rust: '1.64' | ||
jobs: | ||
pre_build: | ||
- VIRTUAL_ENV=${READTHEDOCS_VIRTUALENV_PATH} make VENV=${READTHEDOCS_VIRTUALENV_PATH} build | ||
|
||
sphinx: | ||
configuration: docs/source/conf.py | ||
python: | ||
install: | ||
- requirements: requirements-docs.txt | ||
|
||
mkdocs: | ||
configuration: docs/mkdocs.yml | ||
|
||
formats: | ||
- htmlzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sphinx/_build | ||
sphinx/source/doc_gen/ | ||
site | ||
mkdocs/api_docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import shutil | ||
import subprocess | ||
|
||
|
||
def make_api_docs(*args, **kwargs): | ||
env = os.environ.copy() | ||
env["PATH"] = f"{os.path.abspath('.venv/bin')}:{env['PATH']}" | ||
|
||
# Run sphinx-build directly instead of using make | ||
venv_path = os.getenv("READTHEDOCS_VIRTUALENV_PATH", ".venv") | ||
sphinx_build = os.path.join(os.path.abspath(f"{venv_path}/bin"), "sphinx-build") | ||
subprocess.run( | ||
[ | ||
sphinx_build, | ||
"-b", | ||
"html", | ||
"docs/sphinx/source", # source dir | ||
"docs/sphinx/_build", # build dir | ||
], | ||
check=True, | ||
env=env, | ||
) | ||
|
||
# Copy built docs to mkdocs directory | ||
shutil.copytree("docs/sphinx/_build", "docs/mkdocs/api_docs", dirs_exist_ok=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.