-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
doc: Add GitHub links in the localtoc #20551
Conversation
I am wondering if these links could be more inconspicuous? Perhaps as widgets on the top right corner? |
@tdcmeehan Thanks for the suggestion I used Hugo with google/docsy theme for my previous project. So I directly adopt the layout from there. This is its screenshot: I didn't apply the icon before the menu since I can't find the way to use FontAwesome icons with Sphinx, except directly using SVG (This is another thing I want to figure out.). But I do see fontawesome somewhere in the HTML outputs. Let me try to describe your suggestion more visually: does this match what you imagine? Need to get familiar with the HTML theme (sphinx_material) more to see how can I do that. |
one question, if I use a different CSS style for those links to differentiate those links from the TOC menu, would that work for you? Probably this one is an easier tweak. |
This screenshot looks good. I suppose the core of my feedback was I thought there should be visual differentiation between the new items in the right hand side menu, which relate to the underlying source, and the sections in the document itself. In your screenshot above, it's sufficiently differentiated, because the source code related items have icons, and the font is slightly differentiate--perhaps we could mimic that approach. |
We posted at the same time--yes, exactly. :) |
Sure thing. I definitely can add icons and change the CSS style. Let me figure out how to use FontAwesome icon with Sphinx. I tried to embed icons using SVG and I know it works. However, if FontAwesome is loaded already, using class id is more efficient. Working on it! |
@tdcmeehan I figured out how to use Font-Awesome now :-)
|
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.
Like the font used in the template, I think this is awesome. This is a great feature to help people contribute to the documentation.
Add 4 GitHub links in the localtoc menu: - view source: link to current page's source file - edit source: edit the current page - create doc issue: create an issue - create project issue: create an issue Add Font-Awesome css and use some icons before the links to separate those links from the TOC. A `Content` is added as the title for the TOC. Signed-off-by: Yihong Wang <[email protected]>
4c8227a
to
3cb555f
Compare
Thanks for the review. I squashed commits. I am waiting for the GH workflow jobs, then I will merge the PR afterward. Hope people will use those GitHub links to create documentation issues/PRs when they are available on the official website. |
Description
Add 4 GitHub links in the localtoc menu:
Motivation and Context
Add GitHub links for each doc page to allow users to see the source code and improve the documentation quality if they
see any typo or incorrect message.
Impact
N/A
Test Plan
N/A
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.