-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Added TOC-generator #1151
Added TOC-generator #1151
Conversation
README.md
Outdated
@@ -96,6 +108,7 @@ Lychee supports several feature flags: | |||
|
|||
By default, `native-tls` and `email-check` are enabled. | |||
|
|||
<a name="features"></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.
This is automatically done by Github. E.g. https://github.com/lycheeverse/lychee#features
README.md
Outdated
<br> | ||
[👥 Users](#users) | ||
<br> | ||
<br> |
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 wonder how we can keep this list in sync if we move around stuff. Isn't there a tool for auto-generating the table of contents?
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.
Yes, some tools can automatically update the Table of Contents based on the headings in your document, even if you move or modify the content. One popular tool for generating Table of Content in Markdown is called "markdown-toc." https://github.com/jonschlinkert/markdown-toc
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.
Awesome! There's also a Rust port: https://github.com/pbzweihander/markdown-toc. I prefer that, because it's in Rust like the rest of the code. Would you like to integrate that? E.g. we could just assume that the tool is installed and add a make toc
command, which would call md-toc README.md
?
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.
Yes sir, I will explore the implementation details and ensure it aligns seamlessly with the project's goals and guidelines. If it aligns with the idea you have in mind, I will proceed with implementing the solution and submit a pull request for your review , is that alright ?
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.
Based on the information you have provided I'm guessing you want me to .Build the Rust port
Run the make toc command in md-toc command provided by the Rust port and generate the updated Table of Contents for the README.md file. So that, whenever we need to update the Table of Contents, it automatically regenerates using the Rust port of "markdown-toc".
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.
Yes, that's what I meant.
But now that I think about it, an easier way might be to try out https://github.com/technote-space/toc-generator, which is a GitHub Action, that does everything we need. Their documentation explains how it works.
The Rust thing also works, but it prints the table of contents to stdout
, so we would have to put the output into the file somehow, e.g. with sed
. Not a big deal, but an extra step. Also, we'd have to keep the table of contents up-to-date manually. The GitHub action above would take care of that automatically.
I leave it up to you to decide whatever you like to try. 😉
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.
Thank you for the suggestions I've reviewed the toc-generator GitHub Action you mentioned, and it seems like a great solution for automatically generating and updating the table of contents . I will follow the documentation provided on the repository to set it up and integrate it into the workflow ASAP🙌.
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.
Thanks a lot, Manish.
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 required changes have been made could you please verify?
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.
Some more changes needed.
Done ✅ |
If you have any further feedback or any additional changes needed, please let me know. I'm here to assist and ensure the smooth progress of the project. |
Thanks for your contribution. I had to make a few fixes. Merging, to see if it works now. 😊 |
No description provided.