mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Merge commit '346b60358d
'
This commit is contained in:
commit
43307b07f8
384 changed files with 3305 additions and 3271 deletions
41
docs/content/en/shortcodes/gist.md
Executable file
41
docs/content/en/shortcodes/gist.md
Executable file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
title: Gist
|
||||
description: Embed a GitHub Gist in your content using the gist shortcode.
|
||||
categories: [shortcodes]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: shortcodes
|
||||
weight:
|
||||
weight:
|
||||
---
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `gist` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
|
||||
|
||||
[source code]: {{% eturl gist %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a GitHub gist with this URL:
|
||||
|
||||
```text
|
||||
https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
|
||||
```
|
||||
|
||||
Include this in your Markdown:
|
||||
|
||||
```text
|
||||
{{</* gist user 23932424365401ffa5e9d9810102a477 */>}}
|
||||
```
|
||||
|
||||
This will display all files in the gist alphabetically by file name.
|
||||
|
||||
{{< gist jmooring 23932424365401ffa5e9d9810102a477 >}}
|
||||
|
||||
To display a specific file within the gist:
|
||||
|
||||
```text
|
||||
{{</* gist user 23932424365401ffa5e9d9810102a477 list.html */>}}
|
||||
```
|
||||
|
||||
{{< gist jmooring 23932424365401ffa5e9d9810102a477 list.html >}}
|
Loading…
Add table
Add a link
Reference in a new issue