Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addhosted_on variable for a link in the footer#165

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 2 commits intopython:mainfromhugovk:hosted-on
Jan 27, 2024

Conversation

hugovk
Copy link
Member

Helpspython/docs-community#5.

Ifhosted_on is defined in your docs'conf.py:

html_theme_options= {'collapsiblesidebar':True,'hosted_on':'<a href="https://example.com">Example</a>','issues_url':'/bugs.html','license_url':'/license.html','root_include_title':False# We use the version switcher instead.}

Adds a "Hosted by" line to the footer:

image

Conditional

Forpython/docs-community#5, we can instead add this inconf.py:

ifos.getenv("READTHEDOCS"):html_theme_options["hosted_on"]='<a href="https://about.readthedocs.com/">Read the Docs</a>'

And we'll only get the "Hosted by" line forbuilds created on Read the Docs:

image

Here's a demo build:

If you build that locally or on another server which doesn't have the env var defined, we don't get the link:

image

humitos reacted with thumbs up emoji
Copy link
Contributor

@willingcwillingc left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks@hugovk

hugovk reacted with thumbs up emoji
@hugovkhugovk merged commit3f45850 intopython:mainJan 27, 2024
@hugovkhugovk deleted the hosted-on branchJanuary 27, 2024 14:53
@hugovk
Copy link
MemberAuthor

This has now been released, so here's the follow-up:python/cpython#114697

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@willingcwillingcwillingc approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugovk@willingc

[8]ページ先頭

©2009-2025 Movatter.jp