-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manually add heading links to headers in partials
Fixes #274
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% comment %} | ||
Use this partial when headings links aren't generated through markdown. | ||
Add this partial within the heading you want to link. | ||
Heading id must be the same as the slug passed to this partial. | ||
{% endcomment %} | ||
<span aria-hidden="true"> | ||
<a href="#{{ slug }}" | ||
class="heading-permalink" | ||
aria-label="permanent link to {{ slug }} heading"> | ||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img"> | ||
<use xlink:href="#svg-link"></use> | ||
</svg> | ||
</a> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters