Clarify where to use shortcodes

This commit is contained in:
Vincent Prouillet 2018-10-13 11:15:19 +02:00
parent 6b1c499f64
commit f920b873b8

View file

@ -8,7 +8,8 @@ HTML to add some styling for example.
To solve this, Gutenberg borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API) To solve this, Gutenberg borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API)
from WordPress. from WordPress.
In our case, the shortcode corresponds to a template that is defined in the `templates/shortcodes` directory or a built-in one. In our case, the shortcode corresponds to a template that is defined in the `templates/shortcodes` directory or a built-in one that can
be used in a Markdown file. If you want to use something similar to shortcodes in your templates, try [Tera macros](https://tera.netlify.com/docs/templates/#macros).
## Writing a shortcode ## Writing a shortcode
Let's write a shortcode to embed YouTube videos as an example. Let's write a shortcode to embed YouTube videos as an example.