cu-mkp/research-teaching-companion

Links in headings result in table of contents that links to other pages

Closed this issue · 4 comments

Each .md page that has headings will generate a table of contents menu on the left side with the headings as menu items. Clicking on the table of contents heading will take you to that section on the page. For example:
image

We have just discovered an issue if these headings are links, such as these on the Introduction Page:
image

If you click on their heading in the table of contents menu, instead of being taken to that section on the same page, you are redirected to the page that it links to. So, on the Introduction page, the link to the Syllabi, for example, takes you to the Syllabi page (https://cu-mkp.github.io/research-teaching-companion/resources/syllabi/) instead of just scrolling you down to that section on the Introduction page.

In diagnosing this, we also realized that the links on the intro page were still written in ref short codes (since we are waiting to just globally replace these with markdown syntax), but an additional issue here is that as of now, if the shortcode is still in use in headings, the page just refreshes to the same page --- clicking on "Lessons for Hands-on" just takes you to the top of the Introduction page (something I think Pamela was experiencing and describing anecdotally):
image

DECISION TO BE MADE:
While having the sidebar headings link out to a separate page is not terrible functionality, it is not the designed or expected behavior for these table of contents sidebars. As such, Terry and I propose that headings should not be links. We should instead add a link to the page they are describing in the body text underneath that describes that section. @ps2270 and @thuchacz , I am happy to explain this in person as this becomes more difficult to understand when writing it out as opposed to showing/talking you through it, but would appreciate your thoughts before Terry and I implement this policy: no headings should be links

I see what you mean. I think it's ONLY the introduction page that has headings as links, so that's easily changed. I don't see any other page that has this (although I did not check every page, just the landing pages for all the menu items and resources).
I agree that headings should not be links.

Confirmed: no headers should be linked

Done!