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

Use doctoc to automatically generate TOCs #2213

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

lucacome
Copy link
Member

@lucacome lucacome commented Jul 9, 2024

Proposed changes

Problem: It's hard to write TOCs and keep them up to date

Solution: Use a doctoc to that automatically

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@github-actions github-actions bot added documentation Improvements or additions to documentation chore Pull requests for routine tasks labels Jul 9, 2024
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.62%. Comparing base (f13849a) to head (c9eb47f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2213   +/-   ##
=======================================
  Coverage   87.62%   87.62%           
=======================================
  Files          96       96           
  Lines        6715     6715           
  Branches       50       50           
=======================================
  Hits         5884     5884           
  Misses        774      774           
  Partials       57       57           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lucacome lucacome marked this pull request as ready for review July 9, 2024 21:50
@lucacome lucacome requested review from a team as code owners July 9, 2024 21:50
@mjang
Copy link
Contributor

mjang commented Jul 10, 2024

Question: when I look at Gateway Fabric docs, I already see a doc-level TOC in the left-hand column, and a page-level TOC in the right-hand column.

What's the benefit of this third TOC?

@bjee19
Copy link
Contributor

bjee19 commented Jul 10, 2024

@mjang , @lucacome could add more details, but I could foresee us using this doctoc tool to help generate developer docs TOCs (the stuff that lives on github only) as there is no standardized way that we are currently doing that.

Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

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

This library is looks great !

@lucacome
Copy link
Member Author

yep this would just be for developer docs, as you can see this PR is mostly replacing existing TOCs there.

@lucacome lucacome self-assigned this Jul 10, 2024
@mjang
Copy link
Contributor

mjang commented Jul 10, 2024

@mjang , @lucacome could add more details, but I could foresee us using this doctoc tool to help generate developer docs TOCs (the stuff that lives on github only) as there is no standardized way that we are currently doing that.

Thanks for the explanation! Sounds like a great option to add to whatever template/procedure you have to set up READMEs and similar developer docs.

info: @nginx-jack

@lucacome lucacome enabled auto-merge (squash) July 11, 2024 17:57
@lucacome lucacome merged commit 6cbb524 into nginxinc:main Jul 11, 2024
37 checks passed
@lucacome lucacome deleted the chore/toc branch July 24, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants