Skip to content
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

Merged
merged 8 commits into from
Jul 15, 2023
Merged

Added TOC-generator #1151

merged 8 commits into from
Jul 15, 2023

Conversation

manish0kuniyal
Copy link
Contributor

No description provided.

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>
Copy link
Member

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>
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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 ?

Copy link
Contributor Author

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".

Copy link
Member

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. 😉

Copy link
Contributor Author

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🙌.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, Manish.

Copy link
Contributor Author

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?

Copy link
Member

@mre mre left a 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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@manish0kuniyal
Copy link
Contributor Author

Done ✅

@manish0kuniyal manish0kuniyal changed the title Added links for easy README navigation. Explore different sections with a click! Added TOC-generator Jul 15, 2023
@manish0kuniyal
Copy link
Contributor Author

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.

@mre mre merged commit 8341ab8 into lycheeverse:master Jul 15, 2023
6 checks passed
@mre
Copy link
Member

mre commented Jul 15, 2023

Thanks for your contribution. I had to make a few fixes. Merging, to see if it works now. 😊

@mre mre added the docs Improvements or additions to documentation label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants