Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code snippet for html_context #314

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/posts/addons-by-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True
```

Expand Down Expand Up @@ -122,4 +124,3 @@ If you want to enable Read the Docs Addons in your project, [follow these steps

[Let us know](https://docs.readthedocs.io/page/support.html) any feedback you may have about this change or any of the addons.
We are happy to work together to keep improving them or fix any issue you may have with the migration.

Loading