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: exampleSite/content/cont/markdown.en.md
+74-59Lines changed: 74 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,7 @@ Some of the key benefits are:
25
25
John Gruber, the author of Markdown, puts it like this:
26
26
27
27
> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
28
-
> -- <cite>John Gruber</cite>
29
-
28
+
> -- John Gruber
30
29
31
30
Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file
32
31
@@ -50,12 +49,18 @@ Headings from `h1` through `h6` are constructed with a `#` for each level:
50
49
```
51
50
52
51
Renders to:
53
-
52
+
<!-- markdownlint-disable MD025 -->
54
53
# h1 Heading
54
+
<!-- markdownlint-enable MD025 -->
55
+
55
56
## h2 Heading
57
+
56
58
### h3 Heading
59
+
57
60
#### h4 Heading
61
+
58
62
##### h5 Heading
63
+
59
64
###### h6 Heading
60
65
61
66
HTML:
@@ -78,13 +83,13 @@ Comments should be HTML compatible
78
83
This is a comment
79
84
-->
80
85
```
86
+
81
87
Comment below should **NOT** be seen:
82
88
83
89
<!--
84
90
This is a comment
85
91
-->
86
92
87
-
88
93
## Horizontal Rules
89
94
90
95
The HTML `<hr>` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `<hr>` with any of the following:
@@ -97,11 +102,6 @@ renders to:
97
102
98
103
___
99
104
100
-
---
101
-
102
-
***
103
-
104
-
105
105
## Body Copy
106
106
107
107
Body copy written as normal, plain text will be wrapped with `<p></p>` tags in the rendered HTML.
@@ -111,6 +111,7 @@ So this body copy:
111
111
```markdown
112
112
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
113
113
```
114
+
114
115
renders to this HTML:
115
116
116
117
```html
@@ -120,16 +121,20 @@ renders to this HTML:
120
121
## Emphasis
121
122
122
123
### Bold
124
+
123
125
For emphasizing a snippet of text with a heavier font-weight.
124
126
125
127
The following snippet of text is **rendered as bold text**.
126
128
127
129
```markdown
128
130
**rendered as bold text**
129
131
```
132
+
130
133
renders to:
131
134
135
+
<!-- markdownlint-disable MD036 -->
132
136
**rendered as bold text**
137
+
<!-- markdownlint-enable MD036 -->
133
138
134
139
and this HTML
135
140
@@ -138,6 +143,7 @@ and this HTML
138
143
```
139
144
140
145
### Italics
146
+
141
147
For emphasizing a snippet of text with italics.
142
148
143
149
The following snippet of text is _rendered as italicized text_.
@@ -148,21 +154,24 @@ _rendered as italicized text_
148
154
149
155
renders to:
150
156
157
+
<!-- markdownlint-disable MD036 -->
151
158
_rendered as italicized text_
159
+
<!-- markdownlint-enable MD036 -->
152
160
153
161
and this HTML:
154
162
155
163
```html
156
164
<em>rendered as italicized text</em>
157
165
```
158
166
159
-
160
167
### strikethrough
168
+
161
169
In GFM (GitHub flavored Markdown) you can do strikethroughs.
162
170
163
171
```markdown
164
172
~~Strike through this text.~~
165
173
```
174
+
166
175
Which renders to:
167
176
168
177
~~Strike through this text.~~
@@ -219,10 +228,10 @@ Renders to:
219
228
The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices)
220
229
{{% /notice %}}
221
230
222
-
223
231
## Lists
224
232
225
233
### Unordered
234
+
226
235
A list of items in which the order of the items does not explicitly matter.
227
236
228
237
You may use any of the following symbols to denote bullets for each list item:
@@ -249,8 +258,10 @@ For example
249
258
+ Aenean sit amet erat nunc
250
259
+ Eget porttitor lorem
251
260
```
261
+
252
262
Renders to:
253
263
264
+
<!-- markdownlint-disable MD004 -->
254
265
+ Lorem ipsum dolor sit amet
255
266
+ Consectetur adipiscing elit
256
267
+ Integer molestie lorem at massa
@@ -263,6 +274,7 @@ Renders to:
263
274
+ Faucibus porta lacus fringilla vel
264
275
+ Aenean sit amet erat nunc
265
276
+ Eget porttitor lorem
277
+
<!-- markdownlint-enable MD004 -->
266
278
267
279
And this HTML
268
280
@@ -292,14 +304,15 @@ A list of items in which the order of items does explicitly matter.
292
304
293
305
```markdown
294
306
1. Lorem ipsum dolor sit amet
295
-
2. Consectetur adipiscing elit
296
-
3. Integer molestie lorem at massa
297
-
4. Facilisis in pretium nisl aliquet
298
-
5. Nulla volutpat aliquam velit
299
-
6. Faucibus porta lacus fringilla vel
300
-
7. Aenean sit amet erat nunc
301
-
8. Eget porttitor lorem
307
+
4. Consectetur adipiscing elit
308
+
2. Integer molestie lorem at massa
309
+
8. Facilisis in pretium nisl aliquet
310
+
4. Nulla volutpat aliquam velit
311
+
99. Faucibus porta lacus fringilla vel
312
+
21. Aenean sit amet erat nunc
313
+
6. Eget porttitor lorem
302
314
```
315
+
303
316
Renders to:
304
317
305
318
1. Lorem ipsum dolor sit amet
@@ -353,6 +366,7 @@ Renders to:
353
366
## Code
354
367
355
368
### Inline code
369
+
356
370
Wrap inline snippets of code with `` ` ``.
357
371
358
372
```markdown
@@ -371,21 +385,23 @@ HTML:
371
385
372
386
### Indented code
373
387
374
-
Or indent several lines of code by at least four spaces, as in:
388
+
Or indent several lines of code by at least two spaces, as in:
375
389
376
-
<pre>
377
-
// Some comments
378
-
line 1 of code
379
-
line 2 of code
380
-
line 3 of code
381
-
</pre>
390
+
```markdown
391
+
// Some comments
392
+
line 1 of code
393
+
line 2 of code
394
+
line 3 of code
395
+
```
382
396
383
397
Renders to:
384
398
399
+
<!-- markdownlint-disable MD046 -->
385
400
// Some comments
386
401
line 1 of code
387
402
line 2 of code
388
403
line 3 of code
404
+
<!-- markdownlint-enable MD046 -->
389
405
390
406
HTML:
391
407
@@ -400,19 +416,11 @@ HTML:
400
416
</pre>
401
417
```
402
418
403
-
404
419
### Block code "fences"
405
420
406
421
Use "fences" ```` ``` ```` to block in multiple lines of code.
407
422
408
-
<pre>
409
-
``` markup
410
-
Sample text here...
411
-
```
412
-
</pre>
413
-
414
-
415
-
```
423
+
```markup
416
424
Sample text here...
417
425
```
418
426
@@ -428,28 +436,28 @@ HTML:
428
436
429
437
GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:
430
438
431
-
<pre>
432
-
```js
433
-
grunt.initConfig({
434
-
assemble: {
435
-
options: {
436
-
assets: 'docs/assets',
437
-
data: 'src/data/*.{json,yml}',
438
-
helpers: 'src/custom-helpers.js',
439
-
partials: ['src/partials/**/*.{hbs,md}']
440
-
},
441
-
pages: {
442
-
options: {
443
-
layout: 'default.hbs'
444
-
},
445
-
files: {
446
-
'./': ['src/templates/pages/index.hbs']
439
+
<!-- markdownlint-disable MD046 -->
440
+
```js
441
+
grunt.initConfig({
442
+
assemble: {
443
+
options: {
444
+
assets: 'docs/assets',
445
+
data: 'src/data/*.{json,yml}',
446
+
helpers: 'src/custom-helpers.js',
447
+
partials: ['src/partials/**/*.{hbs,md}']
448
+
},
449
+
pages: {
450
+
options: {
451
+
layout: 'default.hbs'
452
+
},
453
+
files: {
454
+
'./': ['src/templates/pages/index.hbs']
455
+
}
456
+
}
447
457
}
448
-
}
449
-
}
450
-
};
451
-
```
452
-
</pre>
458
+
};
459
+
```
460
+
<!-- markdownlint-disable MD046 -->
453
461
454
462
Renders to:
455
463
@@ -475,8 +483,8 @@ grunt.initConfig({
475
483
```
476
484
477
485
## Tables
478
-
Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.
479
486
487
+
Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.
Add a HTTP `featherlight` parameter to the link image to disable lightbox. By default lightbox is enabled using the featherlight.js plugin. You can disable this by defining `featherlight` to `false`.
684
+
Add a HTTP `featherlight` parameter to the link image to disable lightbox. By default lightbox is enabled using the featherlight.js plugin. You can disable this by defining `featherlight` to `false`.
0 commit comments