-
Notifications
You must be signed in to change notification settings - Fork 1.8k
logo_url theme configuration option #978
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for covering the doc updates as well!
Co-authored-by: Anthony <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we can update the changelog too https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst
ha, found this #777, there we decided to create a block instead of another option. @agjohnson thoughts? |
I would prefer to add a block here, this is a bit niche of a request. Plus a block is even more customizable. |
This will be supported natively in sphinx 4.0 so support there is no need to continue with this or. See sphinx-doc/sphinx#8737 |
I realized this is a different feature than what I linked, I still think this should be a native sphinx feature rather than making it a theme option |
Exactly. Sphinx used to have a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's important to rename the option before it gets more confusing :)
Otherwise LGTM, it's a relevant feature. Might want to suggest it upstream, i.e. for Sphinx's set of Jinja helper functions or for the basic theme.
@@ -126,6 +127,12 @@ Miscellaneous options | |||
Only display the logo image, do not display the project name at the top of | |||
the sidebar | |||
|
|||
.. confval:: logo_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. confval:: logo_url | |
.. confval:: logo_href |
@@ -16,6 +16,7 @@ For example: | |||
'canonical_url': '', | |||
'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard | |||
'logo_only': False, | |||
'logo_url': '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'logo_url': '', | |
'logo_href': '', |
Motivation: Since Sphinx 4.0, logo_url
is used by Sphinx as the path for the logo image file. So this will be confusing.
@@ -116,9 +116,9 @@ | |||
{% block sidebartitle %} | |||
|
|||
{% if logo and theme_logo_only %} | |||
<a href="{{ pathto(master_doc) }}"> | |||
<a href="{{ theme_logo_url or pathto(master_doc) }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="{{ theme_logo_url or pathto(master_doc) }}"> | |
<a href="{{ theme_logo_href or pathto(master_doc) }}"> |
{% else %} | ||
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }} | ||
<a href="{{ theme_logo_url or pathto(master_doc) }}" class="icon icon-home"> {{ project }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="{{ theme_logo_url or pathto(master_doc) }}" class="icon icon-home"> {{ project }} | |
<a href="{{ theme_logo_href or pathto(master_doc) }}" class="icon icon-home"> {{ project }} |
@@ -12,6 +12,7 @@ navigation_depth = 4 | |||
includehidden = True | |||
titles_only = | |||
logo_only = | |||
logo_url = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logo_url = | |
logo_href = |
@benjaoming I'm actually interested in this change. Do you think I can open another PR with your requested changes included? |
@dnltz good question, @agjohnson will have to help you on that one 👍 |
For customizing the page that the logo at the top of the navigation menu links to. Closes #977