mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
1.2 KiB
Executable File
1.2 KiB
Executable File
title, linkTitle, description, categories, keywords, expiryDate
| title | linkTitle | description | categories | keywords | expiryDate |
|---|---|---|---|---|---|
| Gist shortcode | Gist | Embed a GitHub Gist in your content using the gist shortcode. | 2027-02-01 |
{{< deprecated-in 0.143.0 >}}
The gist shortcode was deprecated in version 0.143.0 and will be removed in a future release. To continue embedding GitHub Gists in your content, you'll need to create a custom shortcode:
- Create a new file: Create a file named
gist.htmlwithin thelayouts/shortcodesdirectory. - Copy the source code: Paste the [original source code] of the gist shortcode into the newly created
gist.htmlfile.
This will allow you to maintain the functionality of embedding GitHub Gists in your content after the deprecation of the original shortcode.
[original source code]: {{% eturl gist %}} {{< /deprecated-in >}}
To display a GitHub gist with this URL:
https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
Include this in your Markdown:
{{</* gist user 23932424365401ffa5e9d9810102a477 */>}}
To display a specific file within the gist:
{{</* gist user 23932424365401ffa5e9d9810102a477 list.html */>}}