# Render Hook for Headers

**URL:** <https://discourse.gohugo.io/t/render-hook-for-headers/25007>\
**Category:** support\
**Created:** [April 25, 2020, 4:08am UTC](https://discourse.gohugo.io/t/render-hook-for-headers/25007 "2020-04-25T04:08:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yordis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yordis/32/11150_2.png) [@yordis](https://discourse.gohugo.io/u/yordis)\
**Post date:** [April 25, 2020, 4:08am UTC](https://discourse.gohugo.io/t/render-hook-for-headers/25007/1 "2020-04-25T04:08:10Z")

</div>

Hey folks, I am trying to add some classes to headers but I can not find any information about it

For example:

```auto
## My Title

```

I want to output

```auto
<h2 class="my-custom-class">My Title</h2>

```

---

<div class="post-metadata">

**Author:** ![Jura](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jura/32/13581_2.png) [@Jura](https://discourse.gohugo.io/u/Jura)\
**Post date:** [April 25, 2020, 12:28pm UTC](https://discourse.gohugo.io/t/render-hook-for-headers/25007/2 "2020-04-25T12:28:35Z")

</div>

Welcome Yordis! 👋

I don’t think this feature is available yet. There’s still an open issue about render hooks for headers:

- [Support Markdown Render Hooks for Headers #6713](https://github.com/gohugoio/hugo/issues/6713)

---

<div class="post-metadata">

**Author:** ![angus](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@angus](https://discourse.gohugo.io/u/angus)\
**Post date:** [April 25, 2020, 3:02pm UTC](https://discourse.gohugo.io/t/render-hook-for-headers/25007/3 "2020-04-25T15:02:39Z")

</div>

A very simple shortcode would do what you want.

> **[Create Your Own Shortcodes](https://gohugo.io/templates/shortcode-templates/#readout)**
>
> You can extend Hugo's built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.

---

<div class="post-metadata">

**Author:** ![j2ms](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/j2ms/32/10457_2.png) [@j2ms](https://discourse.gohugo.io/u/j2ms)\
**Post date:** [June 17, 2020, 5:32pm UTC](https://discourse.gohugo.io/t/render-hook-for-headers/25007/4 "2020-06-17T17:32:23Z")

</div>

This feature has been added by [PR #7133](https://github.com/gohugoio/hugo/pull/7133). You can read more about that feature in [Hugo’s documentation](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks).
