# Overriding Content Format Markup Identifiers

**URL:** <https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826>\
**Category:** support\
**Created:** [April 18, 2020, 10:01am UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826 "2020-04-18T10:01:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![balibebas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/balibebas/32/10927_2.png) [@balibebas](https://discourse.gohugo.io/u/balibebas)\
**Post date:** [April 18, 2020, 10:01am UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826/1 "2020-04-18T10:01:49Z")

</div>

Hugo supports several different Content Formats. Supported content formats include Goldmark, AsciiDoc and HTML. Each format contains a set of pre-defined markup identifiers [as noted](https://gohugo.io/content-management/formats/#list-of-content-formats) in the docs. Markup identifiers establish which formatter will be used given the file extension of a piece of content. For example, given a content file with the `ad` extension, Hugo will attempt to shell out to `asciidoctor`.

In my current use case I am attempting to process historical file archives predating AsciiDoc and containing filenames such as `toxicnet.ad`. Given the file extension of `ad` Hugo attempts to process the textfile using `asciidoctor` which is undesirable and, in my case, causes the Hugo build to abend. Given these are historical files being processed modifying them to work around the Hugo behavior is out of the question.

Attempts to create a media type with `ad` extension in order to override the AsciiDoc markup identifier were unfruitful. Given these observations the current design of content formats also seems to prohibit which suffixes may be used on new custom media types, leading Hugo to be less flexible.

Is there a way to override predefined content format markup identifiers or disable content formats so the historic files mentioned may be processed as plain text or processed in a custom way [as suggested](https://discourse.gohugo.io/t/txt-files-and-other-non-md-extensions-as-pages/23773) for `.txt` files last month?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [April 18, 2020, 12:39pm UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826/2 "2020-04-18T12:39:24Z")

</div>

my 2c

hugo shells out asciidoc command, put hugo in a shell file and replace asciidoc in this shell

For Linux read this [https://www.cyberciti.biz/faq/ignore-shell-aliases-functions-when-running-command/](https://www.cyberciti.biz/faq/ignore-shell-aliases-functions-when-running-command/)

If you are under WIndows or Mac, ask google

---

<div class="post-metadata">

**Author:** ![balibebas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/balibebas/32/10927_2.png) [@balibebas](https://discourse.gohugo.io/u/balibebas)\
**Post date:** [April 19, 2020, 10:12am UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826/3 "2020-04-19T10:12:25Z")

</div>

It’s hacky but it sounds like a good workaround. I’m running Arch. Thank you for the link.

---

<div class="post-metadata">

**Author:** ![balibebas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/balibebas/32/10927_2.png) [@balibebas](https://discourse.gohugo.io/u/balibebas)\
**Post date:** [April 19, 2020, 6:46pm UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826/4 "2020-04-19T18:46:57Z")

</div>

Following up, it seems Hugo’s external helpers don’t honor bash aliases so I ended up creating a one-liner bash script with a no-op, calling it `asciidoc` and dropping it into my project. Then I call `hugo foo` with `PATH` adjusted [as suggested here](https://blog.anoff.io/2019-02-17-hugo-render-asciidoc/) to round off the hack.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 21, 2020, 6:47pm UTC](https://discourse.gohugo.io/t/overriding-content-format-markup-identifiers/24826/5 "2020-04-21T18:47:10Z")

</div>

Closed on April 21, 2020, 6:47pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
