| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the efforts, looks good. My main thoughts:
Sorry, something went wrong.
| subprocess.run( | ||
| ["pixi", "run", "--frozen", "install"], | ||
| cwd=self.work_dir, | ||
| env=env, | ||
| check=True, | ||
| ) |
There was a problem hiding this comment.
Can't this be a dependency of the "sphinx-build" task? If not, please add a comment why
Sorry, something went wrong.
| if "JSON_URL" not in env | ||
| else env["JSON_URL"] |
There was a problem hiding this comment.
Please add a comment when JSON_URL is added to the environment when running multidoc.py
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #1368
Description
This is the first step to having multi-version documentation. The steps needed are:
This commit introduces multidoc.py. This is a small helper script that helps build the multiversion documentation.
It has 3 commands:
When a version is added or updated the version is checkout using the git worktree command.
This creates a separate folder which contains the branch/tag of which we want to build the documentation.
Building the documentation in the worktree is done in the same way as we do it currently
To have multi-version support 2 changes need to be made. In the conf.py file we need to add switcher to the html_options. Furthermore we need to create a switcher.json file which contains all the available version in the documentation.
Since older version don't have the updated html_options a patch file is included. When calling add-version or update-version this patch is appllied. This way we can also build documentation for older version.
The add-version and update-version both build the documentation. The add-version also updates the switcher.json file to contain the new version.
The remove-version command removes the specified version from the documentation and updated the switcher.json accordingly
There are some optional flags that can be used.
A useful one in the --local-build flag. This flag rewrites the documentation url to a local filesystem url. This way you can use the switcher also locally.
When running it locally I did a CORS error from chrome. This can be circumenvented by running"
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
Checklist