-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
updated README with Table Of Contents #1155
Conversation
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 a cool suggestion. Did you generate this with an auto-generator or do it yourself? Usually an autogenerated list wouldn't create the <a>
tags because Github's markdown parser turns headings into links automatically.
Doctoc is one of the generators I used in the past. I don't know if we need a toc Definitely the 'a' tags aren't needed |
So basically I was trying to add a toc with clickable links however it was not working for the top 5 sections for some reason, which is why I added the 'a' tags. |
@27Jashshah what you can do is go to this readme on github.com, click each heading to see the correct link, like this one: https://github.com/PokeAPI/pokeapi?tab=readme-ov-file#database-setup the anchor you want is the part after the |
I definitely think that having a ToC makes the README a lot easier to navigate (and to see what's ahead in the README without having to explicitly scroll down), but yeah, there's no need to include the tags cuz I'm pretty sure GitHub automatically handles jumping in Markdowns. I'd be down to fix this myself but not sure how or even if I can edit a PR without being a maintainer. |
Ok, so the thing is, with the no-breaking spaces ( ), GitHub and Markdown files don't read the headers as they normally would (at least, to my knowledge), so the tags are required for these ones. I have updated the code so that only the headers with the no-breaking space have the tags - I'm just about to commit this change. |
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.
Nice work and thank you for the contribution!
A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data. |
The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data. |
Added a Table of Contents, with clickable links to the sections, to the README file.