---
approvers:
- chenopis
title: Custom Hugo Shortcodes
content_template: templates/concept
---
{{% capture overview %}}
This page explains the custom Hugo shortcodes that can be used in Kubernetes markdown documentation.
Read more about shortcodes in the [Hugo documentation](https://gohugo.io/content-management/shortcodes).
{{% /capture %}}
{{% capture body %}}
## Feature state
In a markdown page (`.md` file) on this site, you can add a shortcode to display version and state of the documented feature.
### Feature state demo
Below is a demo of the feature state snippet, which displays the feature as stable in Kubernetes version 1.10.
```
{{* feature-state for_k8s_version="v1.10" state="stable" */>}}
```
Renders to:
{{< feature-state for_k8s_version="v1.10" state="stable" >}}
The valid values for `state` are:
* alpha
* beta
* deprecated
* stable
### Feature state code
The displayed Kubernetes version defaults to that of the page or the site. This can be changed by passing the for_k8s_version shortcode parameter.
```
{{* feature-state for_k8s_version="v1.10" state="stable" */>}}
```
Renders to:
{{< feature-state for_k8s_version="v1.10" state="stable" >}}
#### Alpha feature
```
{{* feature-state state="alpha" */>}}
```
Renders to:
{{< feature-state state="alpha" >}}
#### Beta feature
```
{{* feature-state state="beta" */>}}
```
Renders to:
{{< feature-state state="beta" >}}
#### Stable feature
```
{{* feature-state state="stable" */>}}
```
Renders to:
{{< feature-state state="stable" >}}
#### Deprecated feature
```
{{* feature-state state="deprecated" */>}}
```
Renders to:
{{< feature-state state="deprecated" >}}
## Glossary
You can reference glossary terms with an inclusion that automatically updates and replaces content with the relevant links from [our glossary](/docs/reference/glossary/). When the term is moused-over by someone
using the online documentation, the glossary entry displays a tooltip.
The raw data for glossary terms is stored at [https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary](https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary), with a content file for each glossary term.
### Glossary Demo
For example, the following include within the markdown renders to {{< glossary_tooltip text="cluster" term_id="cluster" >}} with a tooltip:
```liquid
{{* glossary_tooltip text="cluster" term_id="cluster" */>}}
```
## Table captions
You can make tables more accessible to screen readers by adding a table caption. To add a [caption](https://www.w3schools.com/tags/tag_caption.asp) to a table, enclose the table with a `table` shortcode and specify the caption with the `caption` parameter.
{{< note >}}
Table captions are visible to screen readers but invisible when viewed in standard HTML.
{{< /note >}}
Here's an example:
```go-html-template
{{* table caption="Configuration parameters" >}}
Parameter | Description | Default
:---------|:------------|:-------
`timeout` | The timeout for requests | `30s`
`logLevel` | The log level for log output | `INFO`
{{< /table */>}}
```
The rendered table looks like this:
{{< table caption="Configuration parameters" >}}
Parameter | Description | Default
:---------|:------------|:-------
`timeout` | The timeout for requests | `30s`
`logLevel` | The log level for log output | `INFO`
{{< /table >}}
If you inspect the HTML for the table, you should see this element immediately after the opening `