Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

@Bibo-Joshi Bibo-Joshi commented Jul 17, 2024

I received a mail from RT pointing to https://about.readthedocs.com/blog/2024/07/addons-by-default/ and explaining that ptb currenlty relies on html_baseurl and that it should be set via

import os

# Set canonical URL from the Read the Docs Domain
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":
    html_context["READTHEDOCS"] = True

This is also explained somewhat in the current docs

Additional changes may be needed to adapt to RTD addons - in particular they include a native search as you type addon. I'll create a spearate issue for that and link to the furo theme issue tracking the topic.

@Bibo-Joshi Bibo-Joshi added the ⚙️ documentation affected functionality: documentation label Jul 17, 2024
@Bibo-Joshi
Copy link
Member Author

Test build is up at https://docs.python-telegram-bot.org/en/docs-rtd-addons/index.html and looks successful. All links correctly link back to docs.ptb.org

@Bibo-Joshi Bibo-Joshi merged commit c3f17bb into master Jul 21, 2024
@Bibo-Joshi Bibo-Joshi deleted the docs-rtd-addons branch July 21, 2024 19:12
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ documentation affected functionality: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants