From d0148fd6879383d94b4e3bc870cef0b2de8e1e48 Mon Sep 17 00:00:00 2001 From: Mark Sellors Date: Mon, 13 Mar 2023 17:01:46 +0000 Subject: [PATCH] Minor documentation improvement - gists --- examples/gists.qmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/gists.qmd b/examples/gists.qmd index f7d22e8..0a44de6 100644 --- a/examples/gists.qmd +++ b/examples/gists.qmd @@ -5,6 +5,7 @@ Embed a gist using: ``` {.markdown shortcodes="false"} {{< gist >}} ``` + Both `` and `` 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: @@ -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 >}} +``` + +