Every readme heading should be generated with an id, such that links pointing to those headings work properly, e.g. on hexdocs (GitHub automatically does this).
Example
## Advanced Usage
### Another Example
Should generate something like
<h2 id="advanced-usage">
<a href="#advanced-usage" class="anchor" aria-hidden="true"><svg class="icon icon-star"><use xlink:href="#icon-star"></use></svg></a>
Advanced Usage
</h2>
<h3 id="another-example">
<a href="#another-example" class="anchor" aria-hidden="true"><svg class="icon icon-star"><use xlink:href="#icon-star"></use></svg></a>
Another Example
</h2>
Suggested CSS
.anchor {
float: left;
font-size: .75em;
line-height: 2;
margin-left: -1.125em;
padding-right: .125em;
visibility: hidden;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
visibility: visible;
}
Note that the same heading title might be used multiple times, so perhaps a number should be appended to the id in those cases.
Note that the same heading title might be used multiple times, so perhaps a number should be appended to the id in those cases.Note that the same heading title might be used multiple times, so perhaps a number should be appended to the id in those cases.
Mockup
Here's a screenshot of two sets of h2 and h3 tags, top on :hover and bottom normal.

Every readme heading should be generated with an
id, such that links pointing to those headings work properly, e.g. on hexdocs (GitHub automatically does this).Example
Should generate something like
Suggested CSS
Note that the same heading title might be used multiple times, so perhaps a number should be appended to the
idin those cases.Note that the same heading title might be used multiple times, so perhaps a number should be appended to the
idin those cases.Note that the same heading title might be used multiple times, so perhaps a number should be appended to theidin those cases.Mockup
Here's a screenshot of two sets of
h2andh3tags, top on:hoverand bottom normal.