# Markdown pre-processing?

**URL:** <https://discourse.gohugo.io/t/markdown-pre-processing/27299>\
**Category:** support\
**Created:** [August 1, 2020, 10:24am UTC](https://discourse.gohugo.io/t/markdown-pre-processing/27299 "2020-08-01T10:24:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogeralsing](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rogeralsing/32/12039_2.png) [@rogeralsing](https://discourse.gohugo.io/u/rogeralsing)\
**Post date:** [August 1, 2020, 10:24am UTC](https://discourse.gohugo.io/t/markdown-pre-processing/27299/1 "2020-08-01T10:24:42Z")

</div>

Hi,  
Are there any current, or future planned features to support markdown pre-processing?

Shortcodes are great, but sometimes you just want things to be smother and more implicit.  
e.g. just applying classes to tables or lists. rewriting hrefs in links or whatnot.

Also, being able to hook in extensions into Goldmark itself would be pretty nice.

The easiest approach would likely be to have some way to override the markdownify function.  
intercept the content that is passed in there when a .md file is processed.

Thanks

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [August 1, 2020, 12:41pm UTC](https://discourse.gohugo.io/t/markdown-pre-processing/27299/2 "2020-08-01T12:41:21Z")

</div>

Currently, you can:

1. Intercept and rewrite links, images, and headings with [render hooks](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks).

2. Specify [attributes](https://github.com/yuin/goldmark#attributes) for headings (H1-H6) with a kramdown-like syntax. For example:

To specify attributes for elements other than headings you will have to use shortcodes. Hugo uses the [Goldmark](https://github.com/yuin/goldmark) markdown renderer, which adheres to the [CommonMark](https://commonmark.org/) specification. The [discussion of attribute syntax](https://talk.commonmark.org/t/consistent-attribute-syntax/272) as a possible addition to the spec has been going on for _six years_ .

The project maintainer for Goldmark has indicated their intention to extend attribute support to other elements, but will not do so on an _ad hoc_ basis.
