Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Conversation

@rayangler
Copy link
Contributor

@rayangler rayangler commented Jan 31, 2022

Staging Links

Notes

This PR adds the base_url theme to each of the different theme pages. For local testing, I added the following to the property's Makefile:

DOTCOM_BASE_URL=https://www.mongodb.com/docs

## Build with dotcom base url
dotcom-html: export BASE_URL=${DOTCOM_BASE_URL}
dotcom-html:
	rm -rf build/${GIT_BRANCH}
	giza make html

This allows the docs property to be built with an env variable that can be passed to the html theme. html_theme_options in conf.py included the following option:

'base_url': os.getenv('BASE_URL', 'https://docs.mongodb.com'),

{%- endblock -%}

<link rel="shortcut icon" href="https://docs.mongodb.com/assets/favicon.ico" />
<link rel="shortcut icon" href="{{theme_base_url}}/assets/favicon.ico" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The favicon may be absent on the staging links, but should be available once mongodb.com/docs is launched. This asset is already present in the dotcom prod bucket

sitename = MongoDB
nav_excluded = NAV
is_upcoming =
base_url = https://docs.mongodb.com
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this as the default base_url to prevent breaking staging/deploying of docs if they don't have base_url defined in their html_theme_options

@rayangler rayangler marked this pull request as ready for review January 31, 2022 18:17
@rayangler rayangler merged commit aa64ae6 into mongodb:master Feb 3, 2022
@rayangler rayangler deleted the DOP-2662 branch February 3, 2022 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants