Shortcodes - Kaiden-gg/docs GitHub Wiki
Shortcodes are a way to embed special content into your markdown files. They are a way to make your markdown files more dynamic and interactive.
Shortcodes are written in the following format:
{%- shortcode_name "param1" "param2" -%}
There are also special shortcodes, called paired shortcodes which are a sort of containers and can be used together with other shortcodes or markdown text.
{%- paired_shortcode_name "p1" "p2" -%}
{%- shortcode_name "1" "2" -%}
{%- shortcode_name "3" "4" -%}
{%- endpaired_shortcode_name -%}
On this guide, you will find a list of all known shortcodes, if they are paired or not, and how to use them.
List of known shortcodes
General
Element
Quite generic element shortcode, used to create HTML tags. It's quite flexible and can be used in many ways, but it's also quite difficult to use effectively. Use it if you know what you're doing!
{%- element "tag" "cssClasses" -%}
Some markdown here
{%- endelement -%}
Paired: Yes
property | description |
---|---|
element | create an HTML tag (ex: div, p, span) |
cssClasses | associate a single or list of Bootstrap 5 or custom css classes to the element |
Example:
{%- element "div" "container-fluid py-0 px-0 px-lg-1 mx-auto" -%}
{%- element "div" "bg-secondary" -%}
{%- element "h2" "text-lg-start mt-4 mb-0" -%}Test h2{%- endelement -%}
{%- endelement -%}
Some markdown text
{%- endelement -%}
Result: