-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Add table of contents to the integrations pages #13572
Add table of contents to the integrations pages #13572
Conversation
fd48c2a
to
7b51a0d
Compare
It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the |
7b51a0d
to
99ac2a3
Compare
99ac2a3
to
635494e
Compare
In general, I like the idea. However, with longer titles, it becomes really messy in the sidebar really quickly. Also I think implementing this for just one specific integration, doesn't make sense? |
@frenck Yeah, you're right, but we can maybe fix this with some CSS. Also, I think the benefits outweigh this stylistic issue :)
Yep, we'll need to add this to all integrations. As I wrote in the PR description: This PR enables the ToC to the ZHA integration page as an example. If you |
That is not how we should enable it for all integrations... set it as a default in the Jekyll configuration. |
19c557f
to
635494e
Compare
I'll need to figure how to do that. I'll get back to you if I find something. |
I think we can add it to all pages: https://github.com/home-assistant/home-assistant.io/blob/next/_config.yml#L115 We should however add the TOC to other asides as well in that case. |
I actually tried that but it didn't work. There's a limitation of this plugin, and it only works with posts https://github.com/toshimaru/jekyll-toc#2-advanced-usage. I'll keep digging. |
Well, it states it works on collections, since most stuff is a collection in our setup, it should work on almost everything. |
6409472
to
1309644
Compare
@frenck you're right, not sure why this is not working 🤔 I submitted an issue with a question upstream toshimaru/jekyll-toc#116. |
1309644
to
4bab001
Compare
Sorry for the late response, all the styling can be found in the sass folder in the root of the project. |
I feel like the TOC should only be like 2-3 levels. This would reduce the indent and crazy styling as well. We shouldn't need to get that granular |
e84eea5
to
4f5dd8c
Compare
👋 I'll get back to the PR soon! |
1ccd15d
to
d8d31b9
Compare
Any progress on this? |
@Gamester17 As you can see, it is not. Why you ask? |
Yeah, don't know much about frontend, sorry... |
@axilleas just add your css to the |
Ah, I'll try that, thanks! |
d8d31b9
to
7142bf4
Compare
7142bf4
to
c43420e
Compare
This adds a table of contents (ToC) in the integration pages for quick content scanning. In order to disable it, `toc: false` needs to be added in the YAML frontmatter.
c43420e
to
0b40ba1
Compare
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.
Adjust styling a tiny bit.
I think a good extension on this, would be making the nav sticky (if you scroll down, it is still available). However, could not get that to work.
I think this is a good first step and ready to rock.
Thanks, @axilleas 👍
@frenck agreed! Thanks for merging 🚀 |
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Proposed change
This use the https://github.com/toshimaru/jekyll-toc gem to add
a table of contents (ToC) in the integration pages
for quick content scanning. The ToC is enabled by default for all
integrations pages. If you need to disable it,
no_toc: true
needs to beadded in the YAML frontmatter.
Here's how it looks. It's pretty barebones, but we can change the CSS if needed.
Type of change
Jekyll related.
Checklist
current
branch.next
branch.