NEUBIAS / training-resources

Resources for teaching/preparing to teach bioimage analysis
https://neubias.github.io/training-resources
Other
48 stars 21 forks source link

Hyperlinks to headings #215

Open tischi opened 2 years ago

tischi commented 2 years ago
image

@unode do you know how we can make section header "clickable" in a sense that there would be a URL pointing to it? I tried adding <section id="..."> to it, but it did not seem to work...

I feel this should be the place where to add something: https://github.com/NEUBIAS/training-resources/blob/47cbbb25daa7cf892d0ef47e5320218256c1caf3/_layouts/module.html#L124

unode commented 2 years ago

If a field has an id="idname" and the ID is unique in the entire page (required for HTML to validate), you can produce a URL to that section by adding #idname to the end of the URL.

tischi commented 2 years ago

OK, I tried but that does not make it "clickable" such that it generates the URL, should it?

unode commented 2 years ago

no, it doesn't make it clickable. For that you need to have a <a href=''>...</a>. Though if you want to make that more stylized you may want to look into changing the template.