Skip to content

Commit

Permalink
Minor documentation improvement - gists
Browse files Browse the repository at this point in the history
  • Loading branch information
sellorm committed Mar 13, 2023
1 parent 48408bf commit d0148fd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/gists.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Embed a gist using:
``` {.markdown shortcodes="false"}
{{< gist <USERNAME> <GIST_ID> >}}
```

Both `<USERNAME>` and `<GIST_ID>` can be extracted from the gist URL.
For instance, in this URL `https://gist.github.com/sellorm/20525aff669acafb975b7495b8f2066e` the username is `sellorm` and the ID is `20525aff669acafb975b7495b8f2066e`, giving us:

Expand All @@ -15,3 +16,15 @@ For instance, in this URL `https://gist.github.com/sellorm/20525aff669acafb975b7
Which is rendered like this:

{{< gist sellorm 20525aff669acafb975b7495b8f2066e >}}

GitHub's gists can contain more than one file and if you'd like to embed a
specific file from a gist, you can use the shortcode's optional third parameter
to supply the filename.

For example:

``` {.markdown shortcodes="false"}
{{< gist <USERNAME> <GIST_ID> <FILENAME> >}}
```


0 comments on commit d0148fd

Please sign in to comment.