mirror of https://github.com/onweru/compose.git

weru
05.38.2020 48bcd3ffcacf822308adb371073864cb2b06f4a8
exampleSite/content/docs/getting started/shortcodes/index.md
File was renamed from exampleSite/content/docs/customization/shortcodes/index.md
@@ -1,19 +1,14 @@
---
title: "Shortcodes"
weight: 7
weight: 5
description: >
  Use hugo shortcodes to quickly compose site pages.
resources:
- src: "**spruce*.jpg"
  params:
    byline: "Photo: Bjørn Erik Pedersen / CC-BY-SA"
---
Rather than writing all your site pages from scratch, Hugo lets you define and use [shortcodes](https://gohugo.io/content-management/shortcodes/). These are reusable snippets of content that you can include in your pages, often using HTML to create effects that are difficult or impossible to do in simple Markdown. Shortcodes can also have parameters that let you, for example, add your own text to a fancy shortcode text box. As well as Hugo's [built-in shortcodes](https://gohugo.io/content-management/shortcodes/), Compose provides some shortcodes of its own to help you build your pages.
Why shortcodes? While markdown is sufficient to produce simple pages, it's insufficient where complex page structures are needed. Thusly, whenever we need special styling, shortcodes compliment the shortcomings of markdown.
Shortcodes use either `` or `` as the *opening tags*. The former are used if the immediate content is markdown, while the latter is used whenever the immediate content is something else.
This way, you can side step complex html and css boilerplate in your content files.
Sometimes, the shortcode will wrap content, sometimes it won't. When content is wrapped, a closing shortcode tag is needed. Please see the link I provided above and the markdown files for examples. You'll get the gist pretty quickly.