diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/scripts.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index b6f9696d3..52c7c327f 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -10,3 +10,10 @@ <script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script> {{ end }} {{ partial "hooks/body-end.html" . }} + +<script type="text/javascript"> + $("body.td-page,body.td-section").find("main h2,h3,h4").each(function() { + var fragment = $(this).attr('id'); + $(this).append(' <a href="#'+fragment+'" class="header-link"><i class="fas fa-link"></i></a>'); + }); +</script> |