-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
fix: Implement a TOC component #1127
base: main
Are you sure you want to change the base?
Conversation
@valeriahhdez @Kalevins /implementers/interfaces Currently, there is no heading for these sections in the docs. Also, for the Table of Contents (TOC), can we include the titles of the page sections, or is there a better way to organize them? Let’s discuss how we can improve the structure and add appropriate headings and TOC elements. |
@valeriahhdez Please review this PR |
Hi @techmannih, I'm not sure I understand what you mean by "there's no heading for these sections in the docs". Can you please expand on that? |
@valeriahhdez I mean, for these points, there is no heading and content available that can be added in TOC. In toc, we are adding heading |
Summary of our Slack discussion:
|
Hi @DhairyaMajmudar, can you please help us review this PR? |
@techmannih pls. fix the failing ci |
40ce79a
to
54c355a
Compare
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
@DhairyaMajmudar, I have fixed the lint errors. Only the type-checking workflow is still giving an error. |
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.
Hi @techmannih . At first look, it seems that you are repeating the same structure again and again in all pages, all with a lot of repeated code an static code. This is a typical scenario where is better to think about creating a standard component to make all this process much easier.
Check for the Layout.tsx component used to build the layouts. Maybe you can do this by default there.
What do you think?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1127 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 373 373
Branches 94 94
=========================================
Hits 373 373 ☔ View full report in Codecov by Sentry. |
Yes @benjagm , I am following the previous TOC that was built for the blog pages. Please check this one. And yes, I am using "on this page" in a static manner, which is being resolved now. I think you might have seen this in a static way because there are a lot of files, and each section has a separate YAML file. For blog pages, there's only one file, and all the YAML files are rendered within it. But for the documentation, we are using separate files for each section. The TOC is already created; as per my understanding, I am just integrating it into each section |
My expectation with this PR is to avoid having to add the TOC to every single page. Instead, it would be great having it generated automatically at the layout level the same way we have the sidebar automatically generated. |
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.
My expectation with this PR is to avoid having to add the TOC to every single page. Instead, it would be great having it generated automatically at the layout level the same way we have the sidebar automatically generated.
@benjagm Absolutely agree! Having the TOC automatically generated at the layout level would save a lot of time and ensure consistency. I will implement |
H i @techmannih . How is it going with the requested changes? Do you need help or advice? |
What kind of change does this PR introduce?
This PR introduces a new Table of Contents (TOC) component to improve the navigation within long documentation pages. It parses the markdown content and dynamically generates a list of links to the headers, making it easier for users to navigate the page
Issue Number: