Skip to content

Commit d3a049d

Browse files
Clean up embed-files.md
1 parent 5880e64 commit d3a049d

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

docs/embed-files.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,31 +117,27 @@ Field | Example | Description
117117

118118
You will need those to build the _raw gist URL_ for the target file. This has the following format:
119119

120-
- https://gist.githubusercontent.com/USERNAME/GIST_ID/raw/FILENAME
120+
- `https://gist.githubusercontent.com/USERNAME/GIST_ID/raw/FILENAME`
121121

122122
Here are two examples based on the sample gist:
123123

124124
- https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/content.md
125125
- https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/script.js
126126

127-
?> Alternatively, you can get a raw URL directly from a gist by clicking the _Raw_ button next to file. But, if you use that approach, 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.
127+
?> Alternatively, you can get a raw URL directly clicking the _Raw_ button on a gist file. But, if you use that approach, 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.
128128

129129
Continue with one of the sections below to embed the gist on a Docsify page.
130130

131131
### Render markdown content from a gist
132132

133-
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.
134-
135-
?> This approach works equally well with a gist owned by your account or by another user.
133+
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. This approach works equally well with a gist owned by your account or by another user.
136134

137135
Here is the format:
138136

139137
```markdown
140138
[LABEL](https://gist.githubusercontent.com/USERNAME/GIST_ID/raw/FILENAME ':include')
141139
```
142140

143-
?> The `LABEL` can be any text you want. It acts as a _fallback_ message if the link is broken - so it is useful to repeat the filename here in case you need to fix a broken link.
144-
145141
For example:
146142

147143
```markdown
@@ -152,11 +148,11 @@ Which renders as:
152148

153149
[gist: content.md](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/content.md ':include')
154150

155-
### Render a codeblock from a gist
151+
The `LABEL` can be any text you want. It acts as a _fallback_ message if the link is broken - so it is useful to repeat the filename here in case you need to fix a broken link. It also makes an embedded element easy to read at a glance.
156152

157-
The format is the same as the previous section, but with `:type=code` added to the alt text.
153+
### Render a codeblock from a gist
158154

159-
?> 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` set as `code`.
155+
The format is the same as the previous section, but with `:type=code` added to the alt text. 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` set as `code`.
160156

161157
Here is the format:
162158

@@ -173,4 +169,3 @@ For example:
173169
Which renders as:
174170

175171
[gist: script.js](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/script.js ':include :type=code')
176-

0 commit comments

Comments
 (0)