portails/content/docs/cheat-sheets/shortcodes/index.md

7.5 KiB

title description summary date lastmod draft images menu weight toc
Shortcodes A quick reference to the Doks shortcodes. A quick reference to the Doks shortcodes. 2023-05-12T16:36:04+02:00 2023-05-12T16:36:04+02:00 false
docs
parent identifier
shortcodes-b20379ce4f24fa487bf2dd1a8367a4f1
230 true

A quick reference to the Doks shortcodes. {.lead}

{{< callout icon="info-circle" >}} Refer to components for more information. {{< /callout >}}

SVG

Add an SVG from the assets directory, page resources, or Tabler icons.

{{< callout icon="info-circle" >}} The SVG gets embedded into the pages' HTML. {{< /callout >}}

Assets directory

Add e.g. a logo from the assets directory:

{{</* svg icon="svgs/logos/logo-netlify-small-monochrome-lightmode.svg" width="192px" height="79px" class="icon-custom netlify-logo" */>}}

{{< svg icon="svgs/logos/logo-netlify-small-monochrome-lightmode.svg" width="192px" height="79px" class="icon-custom netlify-logo" >}}

Page resources

{{< callout icon="info-circle" >}} Refer to page resources and page bundles for more information. {{< /callout >}}

Add e.g a monogram :

{{</* svg icon="logo-netlify-monogram-monochrome-lightmode.svg" width="64px" height="57px" class="icon-custom netlify-monogram" */>}}

{{< svg icon="logo-netlify-monogram-monochrome-lightmode.svg" width="64px" height="57px" class="icon-custom netlify-monogram" >}}

Tabler icons

{{< callout icon="copy" >}} Copy the icon name from Tabler Icons by clicking on it's name. {{< /callout >}}

Add a Tabler icon:

{{</* svg "rubber-stamp" */>}}

{{< svg "rubber-stamp" >}}

Specify SVG attributes, for example:

{{</* svg icon="rubber-stamp" stroke-width="1" height="3rem" width="3rem" class="icon-custom" */>}}

{{< svg icon="rubber-stamp" stroke-width="1" height="3rem" width="3rem" class="icon-custom" >}}

Callouts

{{</* callout */>}} This is a default callout. Example text to show it in action. {{</* /callout */>}}
{{</* callout info */>}} This is an info callout. Example text to show it in action. {{</* /callout */>}}
{{</* callout warning */>}} This is a warning callout. Example text to show it in action. {{</* /callout */>}}
{{</* callout danger */>}} This is a danger callout. Example text to show it in action. {{</* /callout */>}}

{{< callout >}} This is a default callout. Example text to show it in action. {{< /callout >}}

{{< callout info >}} This is an info callout. Example text to show it in action. {{< /callout >}}

{{< callout warning >}} This is a warning callout. Example text to show it in action. {{< /callout >}}

{{< callout danger >}} This is a danger callout. Example text to show it in action. {{< /callout >}}

Tabler icons

{{< callout icon="copy" >}} Copy the icon name from Tabler Icons by clicking on it's name. {{< /callout >}}

{{</* callout context="info" icon="info-circle" */>}} This is an **info** callout. Example text to show it in action. {{</* /callout */>}}

{{< callout context="info" icon="info-circle" >}} This is an info callout. Example text to show it in action.{{< /callout >}}

{{</* callout context="info" icon="info-circle" */>}}
Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within a callout works with this kind of content.
{{</* /callout */>}}

{{< callout context="info" icon="info-circle" >}} Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within a callout works with this kind of content. {{< /callout >}}

Title

{{</* callout context="info" title="Callout title" */>}} This is an info callout. Example text to show it in action. {{</* /callout */>}}

{{< callout context="info" title="Callout title" >}} This is an info callout. Example text to show it in action. {{< /callout >}}

{{</* callout context="info" title="Callout title" icon="info-circle" */>}} This is an info callout. Example text to show it in action. {{</* /callout */>}}

{{< callout context="info" title="Callout title" icon="info-circle" >}} This is an info callout. Example text to show it in action. {{< /callout >}}

Inline code

{{< callout context="light" icon="info-circle" >}} You can change the commands in the scripts section of ./package.json. {{< /callout >}}

{{< callout context="warning" icon="info-circle" >}} You can change the commands in the scripts section of ./package.json. {{< /callout >}}

{{< callout context="danger" icon="info-circle" >}} You can change the commands in the scripts section of ./package.json. {{< /callout >}}

{{< callout context="info" icon="info-circle" >}} You can change the commands in the scripts section of ./package.json. {{< /callout >}}

Details

{{</* details "How will we conduct IEP and 504 meetings?" */>}}
All meetings will be held *remotely*.
{{</* /details */>}}

{{< details "How will we conduct IEP and 504 meetings?" >}} All meetings will be held remotely. {{< /details >}}

Start in open state

{{</* details "Start in open state" open */>}}
This Boolean attribute indicates whether the details — that is, the contents of the <details> element — are currently visible. The details are shown when this attribute exists, or hidden when this attribute is absent. By default this attribute is absent which means the details are not visible.
{{</* /details */>}}

{{< details "Start in open state" open >}} This Boolean attribute indicates whether the details — that is, the contents of the <details> element — are currently visible. The details are shown when this attribute exists, or hidden when this attribute is absent. By default this attribute is absent which means the details are not visible. {{< /details >}}

Tabs

{{</* tabs "create-new-site" */>}}
{{</* tab "npm" */>}}

```bash
npm create hyas@latest
```

{{</* /tab */>}}
{{</* tab "pnpm" */>}}

```bash
pnpm create hyas@latest
```

{{</* /tab */>}}
{{</* tab "Yarn" */>}}

```bash
yarn create hyas
```

{{</* /tab */>}}
{{</* /tabs */>}}

{{< callout icon="info-circle" >}} The selected tab is remembered in and across pages. {{< /callout >}}

Run the following command in your terminal to start our handy install wizard, create-hyas.

{{< tabs "create-new-site" >}} {{< tab "npm" >}}

npm create hyas@latest

{{< /tab >}} {{< tab "pnpm" >}}

pnpm create hyas@latest

{{< /tab >}} {{< tab "Yarn" >}}

yarn create hyas

{{< /tab >}} {{< /tabs >}}

cd into your new project directory to begin using Hyas. Install your dependencies before continuing.

{{< tabs "install-dependencies" >}} {{< tab "npm" >}}

npm install

{{< /tab >}} {{< tab "pnpm" >}}

pnpm install

{{< /tab >}} {{< tab "Yarn" >}}

yarn install

{{< /tab >}} {{< /tabs >}}

Video

{{</* video ratio="16x9" attributes="controls autoplay muted" webm-src="videos/flower.webm" mp4-src="videos/flower.mp4" */>}}

{{< video ratio="16x9" attributes="controls autoplay muted" webm-src="videos/flower.webm" mp4-src="videos/flower.mp4" >}}