You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/embed-files.md
+20-18
Original file line number
Diff line number
Diff line change
@@ -95,15 +95,13 @@ Embedding any type of source code file, you can specify the highlighted language
95
95
96
96
## Embed a gist
97
97
98
-
You can embed a gist as markdown content or as a code block - this is based on the approach in the [Embed files](#embed-files) but uses raw gist URL as the target.
98
+
You can embed a gist as markdown content or as a code block - this is based on the approach at the start of [Embed Files](#embed-files)section, but uses a raw gist URL as the target.
99
99
100
-
?> No plugin or app config change is needed here. In fact, an "Embed" script tag that is copied from a gist will _not_ load even if you make plugin or config changes to allow the external script.
100
+
?> **No** plugin or app config change is needed here to make this work. In fact, the "Embed" `script` tag that is copied from a gist will _not_ load even if you make plugin or config changes to allow an external script.
101
101
102
-
### Identify gist metadata
102
+
### Identify the gist's metadata
103
103
104
-
Start by viewing a gist on `gist.github.com`.
105
-
106
-
For the purposes of this guide, we assume that is this is a valid gist URL:
104
+
Start by viewing a gist on `gist.github.com`. For the purposes of this guide, we assume that is this is a valid gist URL:
Continue with one of the the sections below to actually embed the gist on a Docsify page.
120
+
?> Alternatively, you can get a raw gist URL directly from a gist by clicking the _Raw_ button on a gist file. But if you use that value, just be sure to **remove** the revision number between `raw/` and the filename so that the URL matches the pattern above instead. Otherwise your embedded gist will **not** show the latest content when the gist is updated.
121
+
122
+
Continue with one of the sections below to embed the gist on a Docsify page.
123
+
124
+
### Render markdown content from a gist
123
125
124
-
### Render markdown content from gist
126
+
This is a great way to embed content **seamlessly** in your docs, without sending someone to an external link. This approach is well-suited to reusing a gist of say installation instructions across doc sites of multiple repos.
125
127
126
-
Embed markdown content on your Docsify page. This is a great way to embed content seemlessly without an external link, whether the gist was created by yourself or another account.
128
+
?> This approach works equally well with a gist owned by your account or by someone else.
?> The the `LABEL`will be the fallback text if the link is broken, so it is useful to repeat the filename in the label.
142
+
?> The `LABEL`can be any text you want. It acts fallback text if the link is broken - so it is useful to repeat the filename here in case you need to fix the link.
141
143
142
-
### Render codeblock from gist
144
+
### Render a codeblock from a gist
143
145
144
-
Embed a gist on your Docsify page as a code block. The format is the same as the previous section, but with `:type=code` added to the alt text.
146
+
The format is the same as the previous section, but with `:type=code` added to the alt text at the end.
145
147
146
-
?> As with the [Embedded file type](#embedded-file-type) section, the syntax highlighting will be inferred from the extension (e.g. `.js` or `.py`) so you can leave the type as the generic value of `code`.
148
+
?> As with the [Embedded file type](#embedded-file-type) section, the syntax highlighting will be inferred from the extension (e.g. `.js` or `.py`), so you can leave the `:type` as the generic value of `code`.
0 commit comments