Skip to content

docs: show PR warning banner and fix links doc source pages#1521

Merged
rickeylev merged 3 commits intobazel-contrib:mainfrom
rickeylev:rtd-testing
Oct 30, 2023
Merged

docs: show PR warning banner and fix links doc source pages#1521
rickeylev merged 3 commits intobazel-contrib:mainfrom
rickeylev:rtd-testing

Conversation

@rickeylev
Copy link
Copy Markdown
Collaborator

This fixes a few issues with the RTD doc building:

  • Warning banner is now shown for PR requests
  • Pages now link to the github source
  • The footer now shows the git commit they were built at

This works by passing the RTD environment variables to the sphinx build process, which allows the conf.py file to get their values. Env vars are passed by a new flag, --//sphinxdocs:extra_env, which allows passing arbitrary environment variable values into the sphinx build process. To make future usage of the RTD env vars easier, the build process passes along all the READTHEDOCS* environment variables.

Fixes #1516

This fixes a few issues with the RTD doc building:

* Warning banner is now shown for PR requests
* Pages now link to the github source
* The footer now shows the git commit they were built at

This works by passing the RTD environment variables to the sphinx build
process, which allows the conf.py file to get their values. Env vars
are passed by a new flag, `--//sphinxdocs:extra_env`, which allows
passing arbitrary environment variable values into the sphinx build
process. To make future usage of the RTD env vars easier, the build
process passes along all the `READTHEDOCS*` environment variables.

Fixes bazel-contrib#1516
@rickeylev rickeylev requested a review from aignas October 30, 2023 21:19
@rickeylev rickeylev added this pull request to the merge queue Oct 30, 2023
@rickeylev rickeylev removed this pull request from the merge queue due to a manual request Oct 30, 2023
@rickeylev rickeylev enabled auto-merge October 30, 2023 23:45
@rickeylev rickeylev added this pull request to the merge queue Oct 30, 2023
Merged via the queue into bazel-contrib:main with commit a326b68 Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs on readthedocs aren't showing some standard features

2 participants