mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-37860: re-add netlify.toml to set up deploy previews for docs (#92852)
* Revert "bpo-46184: remove `netlify.toml` (#30272)"
This reverts commit fbaf2e604c
.
* Delete runtime.txt
* Create runtime.txt
* Delete runtime.txt
* Update netlify.toml
* Update netlify.toml
* Add netlify badge
* Update Doc/tools/templates/layout.html
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update layout.html
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
5837e5f347
commit
85d5a7e8ef
3 changed files with 29 additions and 0 deletions
|
@ -105,6 +105,14 @@ if any('htmlhelp' in arg for arg in sys.argv):
|
|||
# Short title used e.g. for <title> HTML tags.
|
||||
html_short_title = '%s Documentation' % release
|
||||
|
||||
# Deployment preview information, from Netlify
|
||||
# (See netlify.toml and https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)
|
||||
html_context = {
|
||||
"is_deployment_preview": os.getenv("IS_DEPLOYMENT_PREVIEW"),
|
||||
"repository_url": os.getenv("REPOSITORY_URL"),
|
||||
"pr_id": os.getenv("REVIEW_ID")
|
||||
}
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
html_last_updated_fmt = '%b %d, %Y'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue