Skip to content

Commit 9c080a3

Browse files
committed
Fix various markdown warnings
1 parent 8349d61 commit 9c080a3

File tree

1 file changed

+74
-59
lines changed

1 file changed

+74
-59
lines changed

exampleSite/content/cont/markdown.en.md

Lines changed: 74 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ Some of the key benefits are:
2525
John Gruber, the author of Markdown, puts it like this:
2626

2727
> 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
3029
3130
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
3231

@@ -50,12 +49,18 @@ Headings from `h1` through `h6` are constructed with a `#` for each level:
5049
```
5150

5251
Renders to:
53-
52+
<!-- markdownlint-disable MD025 -->
5453
# h1 Heading
54+
<!-- markdownlint-enable MD025 -->
55+
5556
## h2 Heading
57+
5658
### h3 Heading
59+
5760
#### h4 Heading
61+
5862
##### h5 Heading
63+
5964
###### h6 Heading
6065

6166
HTML:
@@ -78,13 +83,13 @@ Comments should be HTML compatible
7883
This is a comment
7984
-->
8085
```
86+
8187
Comment below should **NOT** be seen:
8288

8389
<!--
8490
This is a comment
8591
-->
8692

87-
8893
## Horizontal Rules
8994

9095
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:
97102

98103
___
99104

100-
---
101-
102-
***
103-
104-
105105
## Body Copy
106106

107107
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:
111111
```markdown
112112
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.
113113
```
114+
114115
renders to this HTML:
115116

116117
```html
@@ -120,16 +121,20 @@ renders to this HTML:
120121
## Emphasis
121122

122123
### Bold
124+
123125
For emphasizing a snippet of text with a heavier font-weight.
124126

125127
The following snippet of text is **rendered as bold text**.
126128

127129
```markdown
128130
**rendered as bold text**
129131
```
132+
130133
renders to:
131134

135+
<!-- markdownlint-disable MD036 -->
132136
**rendered as bold text**
137+
<!-- markdownlint-enable MD036 -->
133138

134139
and this HTML
135140

@@ -138,6 +143,7 @@ and this HTML
138143
```
139144

140145
### Italics
146+
141147
For emphasizing a snippet of text with italics.
142148

143149
The following snippet of text is _rendered as italicized text_.
@@ -148,21 +154,24 @@ _rendered as italicized text_
148154

149155
renders to:
150156

157+
<!-- markdownlint-disable MD036 -->
151158
_rendered as italicized text_
159+
<!-- markdownlint-enable MD036 -->
152160

153161
and this HTML:
154162

155163
```html
156164
<em>rendered as italicized text</em>
157165
```
158166

159-
160167
### strikethrough
168+
161169
In GFM (GitHub flavored Markdown) you can do strikethroughs.
162170

163171
```markdown
164172
~~Strike through this text.~~
165173
```
174+
166175
Which renders to:
167176

168177
~~Strike through this text.~~
@@ -219,10 +228,10 @@ Renders to:
219228
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)
220229
{{% /notice %}}
221230

222-
223231
## Lists
224232

225233
### Unordered
234+
226235
A list of items in which the order of the items does not explicitly matter.
227236

228237
You may use any of the following symbols to denote bullets for each list item:
@@ -249,8 +258,10 @@ For example
249258
+ Aenean sit amet erat nunc
250259
+ Eget porttitor lorem
251260
```
261+
252262
Renders to:
253263

264+
<!-- markdownlint-disable MD004 -->
254265
+ Lorem ipsum dolor sit amet
255266
+ Consectetur adipiscing elit
256267
+ Integer molestie lorem at massa
@@ -263,6 +274,7 @@ Renders to:
263274
+ Faucibus porta lacus fringilla vel
264275
+ Aenean sit amet erat nunc
265276
+ Eget porttitor lorem
277+
<!-- markdownlint-enable MD004 -->
266278

267279
And this HTML
268280

@@ -292,14 +304,15 @@ A list of items in which the order of items does explicitly matter.
292304

293305
```markdown
294306
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
302314
```
315+
303316
Renders to:
304317

305318
1. Lorem ipsum dolor sit amet
@@ -353,6 +366,7 @@ Renders to:
353366
## Code
354367

355368
### Inline code
369+
356370
Wrap inline snippets of code with `` ` ``.
357371

358372
```markdown
@@ -371,21 +385,23 @@ HTML:
371385

372386
### Indented code
373387

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:
375389

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+
```
382396

383397
Renders to:
384398

399+
<!-- markdownlint-disable MD046 -->
385400
// Some comments
386401
line 1 of code
387402
line 2 of code
388403
line 3 of code
404+
<!-- markdownlint-enable MD046 -->
389405

390406
HTML:
391407

@@ -400,19 +416,11 @@ HTML:
400416
</pre>
401417
```
402418

403-
404419
### Block code "fences"
405420

406421
Use "fences" ```` ``` ```` to block in multiple lines of code.
407422

408-
<pre>
409-
``` markup
410-
Sample text here...
411-
```
412-
</pre>
413-
414-
415-
```
423+
```markup
416424
Sample text here...
417425
```
418426

@@ -428,28 +436,28 @@ HTML:
428436

429437
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:
430438

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+
}
447457
}
448-
}
449-
}
450-
};
451-
```
452-
</pre>
458+
};
459+
```
460+
<!-- markdownlint-disable MD046 -->
453461

454462
Renders to:
455463

@@ -475,8 +483,8 @@ grunt.initConfig({
475483
```
476484
477485
## 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.
479486
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.
480488
481489
```markdown
482490
| Option | Description |
@@ -553,8 +561,7 @@ HTML:
553561
<a href="http://assemble.io">Assemble</a>
554562
```
555563
556-
557-
### Add a title
564+
### Add a tooltip
558565
559566
```markdown
560567
[Upstage](https://github.com/upstage/ "Visit Upstage!")
@@ -580,6 +587,7 @@ Named anchors enable you to jump to the specified anchor point on the same page.
580587
* [Chapter 2](#chapter-2)
581588
* [Chapter 3](#chapter-3)
582589
```
590+
583591
will jump to these sections:
584592
585593
```markdown
@@ -600,12 +608,15 @@ Images have a similar syntax to links but include a preceding exclamation point.
600608
```markdown
601609
![Minion](https://octodex.github.com/images/minion.png)
602610
```
611+
603612
![Minion](https://octodex.github.com/images/minion.png)
604613
605614
or
615+
606616
```markdown
607617
![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
608618
```
619+
609620
![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
610621
611622
Like links, Images also have a footnote style syntax
@@ -615,6 +626,7 @@ Like links, Images also have a footnote style syntax
615626
```markdown
616627
![Alt text][id]
617628
```
629+
618630
![Alt text][id]
619631
620632
With a reference later in the document defining the URL location:
@@ -652,21 +664,24 @@ Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and
652664
```markdown
653665
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=shadow)
654666
```
667+
655668
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=shadow)
656669
657670
```markdown
658671
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border)
659672
```
673+
660674
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border)
661675
662676
```markdown
663677
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow)
664678
```
679+
665680
![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border,shadow)
666681
667682
### Lightbox
668683
669-
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`.
670685
671686
```markdown
672687
![Minion](https://octodex.github.com/images/minion.png?featherlight=false)

0 commit comments

Comments
 (0)