Skip to content

Commit cfd0d8d

Browse files
authored
# add fenced code identifiers (#1639)
1 parent 2318971 commit cfd0d8d

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/guides/contribute/rockydocs_formatting.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Admonitions are limitless, as noted in custom <sub>1</sub> above. It is possible
5858

5959
An admonition is always entered in this way:
6060

61-
```
61+
```text
6262
!!! admonition_type "custom title if any"
6363
6464
text of admonition
@@ -126,7 +126,7 @@ If an admonition has very long content, consider an expandable admonition. It ha
126126

127127
Which looks like this in your editor:
128128

129-
```
129+
```text
130130
??? warning "Warning Content"
131131
132132
This is a warning, with not very much content. You would want to use a regular admonition for this, but Hey, this is just an example!
@@ -146,7 +146,7 @@ Formatting tabbed content is similar to admonitions. Instead of three exclamatio
146146

147147
Which would look like this in your editor:
148148

149-
```
149+
```text
150150
=== "9.0"
151151
152152
The procedure for doing this in 9.0
@@ -162,7 +162,7 @@ Remember that everything that falls inside of the section must continue to use t
162162

163163
Numbered lists sound like they are easy to create and use, and once you get the hang of them, they really are. If you just have a single list of items with no complexity, then this sort of format works fine:
164164

165-
```
165+
```text
166166
1. Item 1
167167
168168
2. Item 2
@@ -186,7 +186,7 @@ Here is an example of a multi-line numbered list with a code block thrown in for
186186

187187
For example: this has the four (4) space indentation and represents a new paragraph of text. In addition, we are adding a code block in. It is also indented by the same four (4) spaces as our paragraph:
188188

189-
```
189+
```bash
190190
dnf update
191191
```
192192

@@ -199,7 +199,7 @@ And here is how that looks as raw text:
199199
200200
For example: this has the four (4) space indentation and represents a new paragraph of text. In addition, we are adding a code block in. It is also indented by the same four (4) spaces as our paragraph:
201201
202-
```
202+
```bash
203203
dnf update
204204
```
205205
@@ -210,7 +210,7 @@ And here is how that looks as raw text:
210210
211211
Tables help us to lay out command options, or in the above case, admonition types and descriptions. Here is how the table in the Admonitions section was entered:
212212
213-
```
213+
```text
214214
| type | Description |
215215
|-----------|-----------------------------------------------------------|
216216
| note | displays text in a blue box |
@@ -236,7 +236,7 @@ Note that it is not necessary to have each column broken down by size (as we hav
236236
237237
Block quotes are actually designed for quoting text from other sources to include in your documentation, but using them that way is not required. Some contributors use block quotes instead of tables, for instance, to list out some options. Examples of block quotes in markdown would be:
238238
239-
```
239+
```text
240240
> **an item** - A description of that item
241241
242242
> **another item** - Another description of that item
@@ -253,7 +253,7 @@ That ends up looking like this when the page displays:
253253
254254
Our approach to the use of code blocks is pretty simple. If `your code` is short enough that you can (and want to) use it in a sentence like you just saw, use single backticks ++"`"++:
255255
256-
```
256+
```bash
257257
A sentence with a `command of your choosing` in it.
258258
```
259259
@@ -265,7 +265,7 @@ sudo dnf install the-kitchen-sink
265265
```
266266
````
267267
268-
The `bash` bit of that formatting is a non-essential code identifier but can help with syntax highlighting. If you showcase Python, PHP, Ruby, HTML, CSS, or any other kind of code, the "bash" will change to whatever language you use.
268+
The `bash` bit of that formatting is a markdown recommended code identifier but can help with syntax highlighting. If you showcase text, Python, PHP, Ruby, HTML, CSS, or any other kind of code, the "bash" will change to whatever language you use.
269269
270270
Incidentally, if you need to show a code block within a code block, just add one more backtick ++"`"++ to the parent block:
271271
@@ -287,7 +287,7 @@ There might be times when writing documentation where you want to show a prompt
287287
288288
If formatted normally, the copy option will copy the prompt and the command, where copying just the command is preferable. To get around this, you can use the following syntax to tell the copy option what you want copied:
289289
290-
````
290+
````text
291291
``` { .sh data-copy="cd /usr/local" }
292292
[root@localhost root] cd /usr/local
293293
```
@@ -299,7 +299,7 @@ When using this method, the automatic line feed is also suppressed.
299299
300300
Another way to add as much clarity to your documents as possible is to represent the entering of keys on a keyboard in the correct manner. In markdown, do this by surrounding the key or keys with double plus signs (`++`) Do this with `++key++`. For instance, to represent that you need to hit the escape key in your document you would use `++escape++`. When you need to indicate the pressing of multiple keys, add a `+` between them like this: `++ctrl+f4++`. For keys that aren't defined (for instance we are indicating a mystery function key, `Fx` below) put your definition in quotes (`++ctrl+"Fx"++`). If requiring the pressing of keys simultaneously, add "simultaneously" or "at the same time" or some similar phrase to your instructions. Here is an example of a keyboard instruction in your editor:
301301
302-
```
302+
```text
303303
A workstation type installation (with graphical interface) starts this interface on terminal 1. Linux being multi-user, it is possible to connect several users several times, on different **physical terminals** (TTY) or **virtual terminals** (PTS). Virtual terminals are available within a graphical environment. A user switches from one physical terminal to another using ++alt+"Fx"++ from the command line or using ++ctrl+alt+"Fx"++.
304304
```
305305
@@ -325,7 +325,7 @@ Some of the special characters, such as &copy; are not normally superscript, whi
325325
326326
Here is how all the above looks in your markdown code:
327327
328-
```
328+
```text
329329
* represent ordinal numbers, such as 1<sup>st</sup>, 2<sup>nd</sup>, 3<sup>rd</sup>
330330
* copyright and trademark symbols, like <sup>&copy;</sup>, <sup>TM</sup> or &trade;, &reg;
331331
* as notation for references, such as this<sup>1</sup>, this<sup>2</sup> and this<sup>3</sup>
@@ -337,7 +337,7 @@ As you can see, to force superscript you can use the supported HTML tags of `<su
337337
338338
Enter subscript with the `<sub></sub>` tags, and as noted earlier, is not <sub>used nearly as much</sub> in writing.
339339
340-
### Superscript for references
340+
### Superscript for references
341341
342342
Some of you may feel the need to reference outside sources when writing documentation. If you only have a single source, you may wish to include it in your conclusion as a single link, but if you have multiples<sup>1</sup>, you can use superscript to note them in your text<sup>2</sup> and then list them at the end of your document. Note that the positioning of references should come after the "Conclusion" section.
343343
@@ -353,7 +353,7 @@ or
353353
354354
And here is what that all looks like in your editor:
355355
356-
```
356+
```text
357357
1. "How Multiples Are Used In Text" by Wordy W. McWords [https://site1.com](https://site1.com)
358358
2. "Using Superscript In Text" by Sam B. Supersecret [https://site2.com](https://site2.com)
359359
@@ -425,7 +425,7 @@ You can even embed a table or block quote (literally any formatting item type) w
425425
426426
Here is what this example looks like in your editor:
427427
428-
```
428+
```text
429429
430430
As long as you keep track of the magic four (4) spaces to separate these items, they will display logically and exactly the way you want them to. Sometimes that is really important.
431431
@@ -459,7 +459,7 @@ From time to time, you may want to add a comment to your markdown that will not
459459
460460
The best way to add a comment to your markdown is to use the square brackets "[]" around two forward slashes "//" followed by a colon and the content. This would look like this:
461461
462-
```
462+
```text
463463
464464
[//]: This is a comment to be replaced later
465465

0 commit comments

Comments
 (0)