Closed jaimeiniesta closed 2 years ago
I'd be interested in this if it's still up for grabs.
How are the ids generated now for the lessons?
Totally up for grabs!
The ids are generated in the content/lesson.ex
file by the link_fragment/1
function. Essentially, as the table of contents is built, the link_fragment/1
function accepts the section name and generates an id to use in the link to the section. The same id is ultimately used in the _section_header.html.eex
template.
If you have any questions or want more clarification, let me know and thanks for taking a stab at this 🎊
I've just checked and this issue is now fixed! 🚀
Thank you @vclayton 👏 👏 👏
There are some duplicate IDs generated by the table of contents for the lessons:
https://rocketvalidator.com/s/0bdee490-cff7-495a-95a3-40211cd2b5cd/i?search=duplicate+ID
For example, in https://beta.elixirschool.com/en/ecto/associations there are 2 sections titled "Many to Many":
Clicking on those will always get you to the first one, as the second is a duplicate.
In order to fix this we need to give a unique ID to each section. I'm not sure how to do that, maybe including numbers, like:
...