Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ build-preview:
## Empty build cache and run on your local machine.
clean:
hugo --cleanDestinationDir
make setup
make site
Comment on lines 37 to 41
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clean target now runs make setup and make site, which introduces network installs and starts a server as a side effect. That makes make clean non-obvious and harder to use in CI or scripting. Consider keeping clean limited to cleaning, and adding a separate target (e.g., reset/rebuild) that chains clean, setup, and site.

Copilot uses AI. Check for mistakes.

## Fix Markdown linting issues
Expand Down
1 change: 1 addition & 0 deletions assets/icons/exoscale-demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions content/content-formatting-examples/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: Content Formatting Examples
weight: 5
description: A collection of shortcode examples for formatting content, from basic Markdown text to advanced custom components.
draft: true
---

{{< alert type="danger" title="Example Page: Not for Production" >}}
This page will not be published in the [production version](https://cloud.layer5.io/academy/) of your Academy site. It is only visible for local preview (`draft: true`) and serves as a reference. You can safely delete this page from your repository at any time.
{{< /alert >}}

The Layer5 Academy platform supports a wide range of shortcodes for enriching your learning content. Shortcodes are reusable template snippets you invoke in Markdown files to generate HTML output.

Using a shortcode looks like this:

```code
{ {% shortcode-name %}}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shortcode syntax shown in the example is malformed ({ {% shortcode-name %}}) and includes an extra space/brace pattern that readers can’t copy/paste. Update the snippet to show a valid Hugo shortcode invocation (e.g., {{% shortcode-name %}}).

Suggested change
{ {% shortcode-name %}}
{{% shortcode-name %}}

Copilot uses AI. Check for mistakes.
```

Shortcodes come from three sources:

1. **Academy Theme** — shortcodes built specifically for the Layer5 Academy ([academy-theme repo](https://github.com/layer5io/academy-theme)).
2. **Docsy Theme** — shortcodes inherited from the [Google Docsy](https://www.docsy.dev/) documentation theme.
3. **Hugo Built-in** — shortcodes included with the [Hugo](https://gohugo.io/) static site generator.

For guidance on creating your own custom shortcodes, see [Extending the Academy](/cloud/academy/creating-content/extending-the-academy/).

The shortcode name is the file name (minus the `.html`) in `layouts/shortcodes/your-org-uuid`.

## Browse examples

Each example now lives in its own content file so you can inspect and reuse it independently.

The academy theme overrides the Docsy `alert` and `pageinfo` shortcodes, and it also overrides Hugo's built-in `details` shortcode. The dedicated example pages for those overridden implementations use local demo aliases: `docsy-alert`, `docsy-pageinfo`, and `hugo-details`.

The `lab-intro` shortcode stores content for lab layouts instead of writing output directly, so its dedicated example page uses a small local helper to preview the stored value.

### Hugo built-in shortcodes

* [Hugo Details](./hugo-details/)
* [Figure](./figure/)
* [Highlight](./highlight/)
* [Instagram](./instagram/)
* [Param](./param/)
* [QR](./qr/)
* [Ref](./ref/)
* [Relref](./relref/)
* [Vimeo](./vimeo/)
* [X](./x/)
* [YouTube](./youtube/)

### Docsy shortcodes

* [Docsy Alert](./docsy-alert/)
* [Blocks Cover and Link Down](./blocks-cover-link-down/)
* [Blocks Lead](./blocks-lead/)
* [Blocks Section and Feature](./blocks-section-feature/)
* [Card](./card/)
* [Cardpane](./cardpane/)
* [Comment](./comment/)
* [Conditional Text](./conditional-text/)
* [Iframe](./iframe/)
* [Imgproc](./imgproc/)
* [Docsy Pageinfo](./docsy-pageinfo/)
* [Readfile](./readfile/)
* [Redoc](./redoc/)
* [SwaggerUI](./swaggerui/)
* [Tabpane and Tab](./tabpane-tab/)

### Layer5 Academy theme shortcodes

* [Theme Alert](./theme-alert/)
* [Chapterstyle](./chapterstyle/)
* [CSV Table](./csvtable/)
* [CSV Table Roles](./csvtable-roles/)
* [Theme Details](./theme-details/)
* [Image](./image/)
* [Lab Intro](./lab-intro/)
* [Local Video](./local-video/)
* [Meshery Design Embed](./meshery-design-embed/)
* [Theme Pageinfo](./theme-pageinfo/)
* [SVG](./svg/)
* [Usestatic](./usestatic/)
* [Version](./version/)

### Repository-local organization shortcode

* [Custom Organization Shortcode](./custom-org-shortcode/)

## Markdown

* [Markdown Basics](./markdown-basics/)
* [Image Styling](./image-styling/)
* [Code](./code/)
* [Lists](./lists/)
* [Tables](./tables/)
* [Responsive Images](./responsive-images/)

## Components

* [Embedded Design](./embedded-design/)
* [Alerts](./alerts/)
* [TabPanel](./tabpanel/)
* [Collapsible](./collapsible/)
* [Footnotes](./footnotes/)
13 changes: 13 additions & 0 deletions content/content-formatting-examples/alerts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Alerts
linkTitle: Alerts
weight: 345
description: Examples of the alert shortcode variants.
draft: true
---

{{< alert title="Note" >}}A plain alert with a title.{{< /alert >}}
{{< alert type="note" title="Note" >}}This alert supports a title and **Markdown**.{{< /alert >}}
{{< alert type="info" title="Info" >}}This is an informational alert.{{< /alert >}}
{{< alert type="danger" title="Danger" >}}This is a danger alert.{{< /alert >}}
{{< alert type="warning" title="Warning" >}}This is a warning alert.{{< /alert >}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Blocks Cover and Link Down
linkTitle: Blocks Cover + Link Down
weight: 115
description: Render the Docsy blocks/cover shortcode together with blocks/link-down.
draft: true
---

{{< blocks/cover title="Docsy Cover Block" subtitle="Hero Example" color="dark" height="min" >}}
This cover block uses page resources named `background` and `logo`.

{{< blocks/link-down color="info" >}}
{{< /blocks/cover >}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions content/content-formatting-examples/blocks-lead.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Blocks Lead
linkTitle: Blocks Lead
weight: 120
description: Render the Docsy blocks/lead shortcode.
draft: true
---

{{< blocks/lead color="primary" height="min" >}}
This is a live `blocks/lead` example.
{{< /blocks/lead >}}
13 changes: 13 additions & 0 deletions content/content-formatting-examples/blocks-section-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Blocks Section and Feature
linkTitle: Blocks Section + Feature
weight: 125
description: Render the Docsy blocks/section and blocks/feature shortcodes together.
draft: true
---

{{< blocks/section color="light" type="container" >}}
{{< blocks/feature icon="fa-layer-group" title="Reusable" >}}Use shortcodes to compose reusable content patterns.{{< /blocks/feature >}}
{{< blocks/feature icon="fa-code" title="Declarative" >}}Keep formatting examples inside Markdown instead of hard-coding HTML everywhere.{{< /blocks/feature >}}
{{< blocks/feature icon="fa-book" title="Documented" >}}This page shows how each shortcode behaves when rendered.{{< /blocks/feature >}}
{{< /blocks/section >}}
11 changes: 11 additions & 0 deletions content/content-formatting-examples/card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Card
linkTitle: Card
weight: 130
description: Render the Docsy card shortcode.
draft: true
---

{{% card header="Docsy Card" title="Single card example" footer="Card footer" %}}
This is a rendered Docsy `card` shortcode.
{{% /card %}}
19 changes: 19 additions & 0 deletions content/content-formatting-examples/cardpane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Cardpane
linkTitle: Cardpane
weight: 135
description: Render the Docsy cardpane shortcode with nested cards.
draft: true
---

{{% cardpane %}}
{{% card header="Step 1" %}}
Install prerequisites.
{{% /card %}}
{{% card header="Step 2" %}}
Configure the environment.
{{% /card %}}
{{% card header="Step 3" %}}
Run the validation command.
{{% /card %}}
{{% /cardpane %}}
11 changes: 11 additions & 0 deletions content/content-formatting-examples/chapterstyle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Chapterstyle
linkTitle: Chapterstyle
weight: 215
description: Render the academy-theme chapterstyle shortcode.
draft: true
---

{{% chapterstyle style="padding: 1rem; border: 1px solid #d0d7de; border-radius: 0.75rem; background: #f8fafc;" %}}
This content is wrapped by the `chapterstyle` shortcode.
{{% /chapterstyle %}}
13 changes: 13 additions & 0 deletions content/content-formatting-examples/code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Code
linkTitle: Code
weight: 320
description: Code block and inline code examples.
draft: true
---

```text
This is a code block.
```

Inline code like `var foo = "bar";` is supported.
17 changes: 17 additions & 0 deletions content/content-formatting-examples/collapsible.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Collapsible
linkTitle: Collapsible
weight: 355
description: Example of a collapsible details block.
draft: true
---

{{< details summary="This is a collapsible title" >}}

This is the collapsed content.

It can be a list:

* First item
* Second item
{{< /details >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Comment
linkTitle: Comment
weight: 140
description: Render the Docsy comment shortcode.
draft: true
---

Visible text before the comment shortcode. {{< comment >}}This sentence is intentionally hidden by the Docsy `comment` shortcode.{{< /comment >}} Visible text after the comment shortcode.
11 changes: 11 additions & 0 deletions content/content-formatting-examples/conditional-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Conditional Text
linkTitle: Conditional Text
weight: 145
description: Render the Docsy conditional-text shortcode.
draft: true
---

{{< conditional-text include-if="examples" >}}
This sentence is rendered because `params.buildCondition` is set to `examples`.
{{< /conditional-text >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/csvtable-roles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: CSV Table Roles
linkTitle: CSV Table Roles
weight: 225
description: Render the academy-theme csvtable-roles shortcode.
draft: true
---

{{< csvtable-roles >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/csvtable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: CSV Table
linkTitle: CSV Table
weight: 220
description: Render the academy-theme csvtable shortcode.
draft: true
---

{{< csvtable >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/custom-org-shortcode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Custom Organization Shortcode
linkTitle: Custom Org Shortcode
weight: 280
description: Render the repository-local organization shortcode.
draft: true
---

{{< 1e2a8e46-937c-47ea-ab43-5716e3bcab2e/custom-org-shortcode names="Exoscale Academy" >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/docsy-alert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Docsy Alert
linkTitle: Docsy Alert
weight: 110
description: Render the Docsy alert shortcode through the local demo alias.
draft: true
---

{{< docsy-alert color="info" title="Docsy alert" >}}This block uses the Docsy implementation of the `alert` shortcode.{{< /docsy-alert >}}
9 changes: 9 additions & 0 deletions content/content-formatting-examples/docsy-pageinfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Docsy Pageinfo
linkTitle: Docsy Pageinfo
weight: 160
description: Render the Docsy pageinfo shortcode through the local demo alias.
draft: true
---

{{< docsy-pageinfo color="primary" >}}This block uses the Docsy implementation of `pageinfo`.{{< /docsy-pageinfo >}}

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions content/content-formatting-examples/embedded-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Embedded Design
linkTitle: Embedded Design
weight: 340
description: Example of the meshery-design-embed component shortcode.
draft: true
---

```code
{{</* meshery-design-embed
id="embedded-design-c811e9f4-2522-4eb6-b775-7475545356d8"
src="/content-formatting-examples/embedded-design-deploy-meshery-using-meshery.js"
*/>}}
```

The rendered output is shown below:

{{< meshery-design-embed
id="embedded-design-c811e9f4-2522-4eb6-b775-7475545356d8"
src="/content-formatting-examples/embedded-design-deploy-meshery-using-meshery.js"
>}}

Learn more about embedded designs: [Meshery design embedding documentation](https://docs.layer5.io/kanvas/designer/embedding-designs/).
9 changes: 9 additions & 0 deletions content/content-formatting-examples/figure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Figure
linkTitle: Figure
weight: 15
description: Render the Hugo figure shortcode.
draft: true
---

{{< figure src="/1e2a8e46-937c-47ea-ab43-5716e3bcab2e/images/exoscale-icon.png" alt="Exoscale icon" caption="A Hugo figure shortcode rendering a static image." >}}
11 changes: 11 additions & 0 deletions content/content-formatting-examples/footnotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Footnotes
linkTitle: Footnotes
weight: 360
description: Example of Markdown footnotes.
draft: true
---

This is a superscript number for your footnote. [^1]

[^1]: This is a footnote.
17 changes: 17 additions & 0 deletions content/content-formatting-examples/highlight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Highlight
linkTitle: Highlight
weight: 20
description: Render the Hugo highlight shortcode.
draft: true
---

{{< highlight go "linenos=table,hl_lines=3" >}}
package main

import "fmt"

func main() {
fmt.Println("hello from the highlight shortcode")
}
{{< /highlight >}}
11 changes: 11 additions & 0 deletions content/content-formatting-examples/hugo-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Hugo Details
linkTitle: Hugo Details
weight: 10
description: Render the Hugo built-in details shortcode.
draft: true
---

{{% hugo-details summary="Hugo built-in details" open=true %}}
This content is rendered through the built-in Hugo `details` behavior.
{{% /hugo-details %}}
Loading
Loading