# Adding anchor next to headers

**URL:** <https://discourse.gohugo.io/t/adding-anchor-next-to-headers/1726>\
**Category:** support\
**Created:** [September 15, 2015, 7:37pm UTC](https://discourse.gohugo.io/t/adding-anchor-next-to-headers/1726 "2015-09-15T19:37:05Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [March 4, 2018, 2:15pm UTC](https://discourse.gohugo.io/t/adding-anchor-next-to-headers/1726/9 "2018-03-04T14:15:27Z")

</div>

Being JS-illiterate, I just use this one-liner in Hugo partial 😃

> <https://github.com/kaushalmodi/hugo-onyx-theme/blob/master/layouts/partials/headline-hash.html>

Use it as:

```auto
{{ partial "headline-hash.html" .Content }}

```

[Example](https://ox-hugo.scripter.co/doc/dates/#dates-subtree-based-exports)

---

_[View the full topic](https://discourse.gohugo.io/t/adding-anchor-next-to-headers/1726)._
