googlearchive / workbox-microsite

Workbox Microsite
Apache License 2.0
24 stars 13 forks source link

Implement pretty anchors #84

Closed kaycebasques closed 7 years ago

kaycebasques commented 7 years ago

In DevSite, I can just use the following syntax to define an explicit anchor for each section:

## Name of section {: #name }

And then you link to that section via https://example.com/page#name.

Jekyll just auto-generates section anchors from the text, which often creates really ugly and long anchors. Also, if you change the text, the anchor fragment is no longer valid. This is a big problem for me, because I do change the text often, and I often link directly to sections for maximum usability

gauntface commented 7 years ago

Does the above not work at the moment?

kaycebasques commented 7 years ago

No, it does not

gauntface commented 7 years ago

Just looked into this and you need to add a new line to do this

## Name of section
{: #name }