# Docs suggestion: explain what shortcodes are and what's like them

**URL:** <https://discourse.gohugo.io/t/docs-suggestion-explain-what-shortcodes-are-and-whats-like-them/6051>\
**Category:** feature\
**Created:** [April 6, 2017, 12:18am UTC](https://discourse.gohugo.io/t/docs-suggestion-explain-what-shortcodes-are-and-whats-like-them/6051 "2017-04-06T00:18:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adiabatic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/adiabatic/32/2913_2.png) [@adiabatic](https://discourse.gohugo.io/u/adiabatic)\
**Post date:** [April 6, 2017, 12:18am UTC](https://discourse.gohugo.io/t/docs-suggestion-explain-what-shortcodes-are-and-whats-like-them/6051/1 "2017-04-06T00:18:17Z")

</div>

I’d put something like the following right after the introductory paragraph in [https://gohugo.io/templates/shortcode-templates/#creating-custom-shortcodes](https://gohugo.io/templates/shortcode-templates/#creating-custom-shortcodes):

> Shortcodes are a way to have template functionality in your content files with an easy, memorable way to pass text from your content files into a template that is expanded inside of your content. If you’d like to be able to easily pass information from a template into another template, have a look at [dict](https://gohugo.io/functions/dict/).

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [April 6, 2017, 11:27am UTC](https://discourse.gohugo.io/t/docs-suggestion-explain-what-shortcodes-are-and-whats-like-them/6051/2 "2017-04-06T11:27:30Z")

</div>

@adiabatic I agree that a definition of a shortcode in the first paragraph is a useful addition.

/cc @rdwatters

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [April 6, 2017, 8:40pm UTC](https://discourse.gohugo.io/t/docs-suggestion-explain-what-shortcodes-are-and-whats-like-them/6051/3 "2017-04-06T20:40:35Z")

</div>

@adiabatic

Thanks for all the feedback. I appreciate it!

**A few items**

Shortcodes are already defined in the content management section:

> **[Shortcodes](https://gohugo.io/content-management/shortcodes/#what-is-a-shortcode)**
>
> Shortcodes are simple snippets inside your content files calling built-in or custom templates.

That said, I repeated some of the content in the templating section per your suggestion:

> <https://github.com/rdwatters/hugo-docs-concept/issues/67>

Here it is live, along with a few other weird language issues I found during a quick review of the page:

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

As for the suggestion to add a reference to `dict`, this doesn’t seem like the right location. I think it’s better to describe shortcodes as the intermediary between templates and content and draw the comparison to _partials_ (i.e., what I already had included in the above “What is a Shortcode” page section).

That said, you got me thinking about the value of providing more examples of the relationship between `dict` and partials:

> <https://github.com/rdwatters/hugo-docs-concept/issues/68>

I will likely have this updated/closed tonight, so stay tuned.

**Note:** I have two usage examples of `partial` and `dict` together already on `dict`'s function page:

> **[dict](https://gohugo.io/functions/dict/)**
>
> Creates a dictionary from a list of key and value pairs.

…in addition to the high-level description of said function, which descriptions are now included in _every_ function via the new [Functions quick reference](https://gohugo.io/functions/).
