-
Notifications
You must be signed in to change notification settings - Fork 326
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
ENH: Add logo_link theme option #246
ENH: Add logo_link theme option #246
Conversation
19f0b4f
to
99cbaec
Compare
What is the expected behavior if somebody changes their |
I think it would still be okay as long as that person writes the following (will confirm this locally)
which as far as I know is how people usually do it when they make custom HTML landing page. That said, it'll probably result in a broken link if the project does not have an |
yeah I'd rather provide a theme option to over-ride the logo link...I think that's a bit less-hacky than asking people to define a custom template mapping |
@leonarduschen thanks for looking into this! One thing I am wondering: how do other themes handle this? Eg readthedocs theme also has a logo that points to the "home"/"index" page. |
Hmm, seems they are also using |
Yep it seems so. Alabaster does too https://github.com/bitprophet/alabaster/blob/master/alabaster/about.html But I guess it can't hurt to add a logo theme option though (instead of the problematic original idea to change it to |
Done! |
0c03560
to
f44864b
Compare
@choldgraf I have tested locally and can confirm it works for both external link and local doc. |
ping |
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.
@leonarduschen sorry for the slow follow-up, but this looks good to me!
Could you add a small section about this option in configuring.rst ?
done! |
docs/user_guide/configuring.rst
Outdated
@@ -19,6 +19,15 @@ doc path's _static folder, and use the following configuration: | |||
|
|||
html_logo = "_static/logo.png" | |||
|
|||
The logo links to ``master_doc`` by default. If you'd like to link to other page |
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.
The logo links to ``master_doc`` by default. If you'd like to link to other page | |
The logo links to ``master_doc`` (usually the first page of your documentation) by default. If you'd like to link to another page |
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.
Agree on "other page" to "another page" but the logo really links to master_doc
by default though and sometimes master_doc
is not the landing page (e.g. numpy dev docs).
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.
hmmm - fair enough, what do you think about the new language suggestion? The thing is that most users don't know what master_doc
is so I prefer using terminology that the "average" user will likely understand
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.
another thing we could do instead is include a link to the Sphinx documentation for 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.
I think the new language suggestion is pretty informative!
Add a description of what ``master_doc`` is
@jorisvandenbossche let me know if you'd like me to change anything :) |
ping |
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.
Sorry for the slow follow-up, @mattip thanks for the ping, and @leonarduschen thanks for the updates! Looking good!
Just confirming, this is not in a release yet? This option is described in the published docs, but I get an error about |
What you link to are the development docs .. (we should maybe link to the stable docs on the github landing page / make it the default readthedocs url). |
Ah yes, I just clicked through from the link in the GitHub README (also I assumed "latest" means "latest release" but forgot RTD has a strange (to me) convention about that). Thanks for clarifying! |
@jorisvandenbossche is there a reason you don't want to release? I am always worried when I see sentences like
Cutting a release only takes like 2 minutes, so we should just make a release unless there's a strong reason that we want to block it! |
I don't know much about release workflows but if QA is the concern I can quickly write some tests to cover this feature |
Actually yes ;) #312 needs to go in, because I don't want to have people start relying on variables names we are going to change. Now, that's a trivial PR and I rebased it now, so I can release later this evening. |
👍 to progress, I'll also get #294 back in fighting shape.
Yeah, perhaps adjusting the RTD workflow to reflect that, and having to Push The Button to "activate" a tag as a |
Closes #245
Add
logo_link
option to specify the page linked tologo
(default ismaster_doc
)logo_link
is treated as a URL if it starts with "http" otherwise treat it as RST doc.