Markdown Syntax
Markdown is a lightweight markup language used to add formatting elements to plaintext text documents. This article shows the syntax of markdown elements in hugo theme Walden.
Headings
Syntax
1## H2
2### H3
3#### H4
4##### H5
5###### H6
H2
H3
H4
H5
H6
Paragraphs
Syntax
1When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
2
3I should not obtrude my affairs so much on the notice of my readers if very particular inquiries had not been made by my townsmen concerning my mode of life, which some would call impertinent, though they do not appear to me at all impertinent, but, considering the circumstances, very natural and pertinent. Some have asked what I got to eat; if I did not feel lonesome; if I was not afraid; and the like. Others have been curious to learn what portion of my income I devoted to charitable purposes; and some, who have large families, how many poor children I maintained. I will therefore ask those of my readers who feel no particular interest in me to pardon me if I undertake to answer some of these questions in this book. In most books, the I, or first person, is omitted; in this it will be retained; that, in respect to egotism, is the main difference. We commonly do not remember that it is, after all, always the first person that is speaking. I should not talk so much about myself if there were anybody else whom I knew as well. Unfortunately, I am confined to this theme by the narrowness of my experience. Moreover, I, on my side, require of every writer, first or last, a simple and sincere account of his own life, and not merely what he has heard of other men's lives; some such account as he would send to his kindred from a distant land; for if he has lived sincerely, it must have been in a distant land to me. Perhaps these pages are more particularly addressed to poor students. As for the rest of my readers, they will accept such portions as apply to them. I trust that none will stretch the seams in putting on the coat, for it may do good service to him whom it fits.
When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
I should not obtrude my affairs so much on the notice of my readers if very particular inquiries had not been made by my townsmen concerning my mode of life, which some would call impertinent, though they do not appear to me at all impertinent, but, considering the circumstances, very natural and pertinent. Some have asked what I got to eat; if I did not feel lonesome; if I was not afraid; and the like. Others have been curious to learn what portion of my income I devoted to charitable purposes; and some, who have large families, how many poor children I maintained. I will therefore ask those of my readers who feel no particular interest in me to pardon me if I undertake to answer some of these questions in this book. In most books, the I, or first person, is omitted; in this it will be retained; that, in respect to egotism, is the main difference. We commonly do not remember that it is, after all, always the first person that is speaking. I should not talk so much about myself if there were anybody else whom I knew as well. Unfortunately, I am confined to this theme by the narrowness of my experience. Moreover, I, on my side, require of every writer, first or last, a simple and sincere account of his own life, and not merely what he has heard of other men’s lives; some such account as he would send to his kindred from a distant land; for if he has lived sincerely, it must have been in a distant land to me. Perhaps these pages are more particularly addressed to poor students. As for the rest of my readers, they will accept such portions as apply to them. I trust that none will stretch the seams in putting on the coat, for it may do good service to him whom it fits.
Emphasis
Bold
Syntax
1**When I wrote the following pages, or rather the bulk of them, I lived alone,** in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
Italic
Syntax
1*When I wrote the following pages, or rather the bulk of them, I lived alone,* in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
Bold and Italic
Syntax
1***When I wrote the following pages, or rather the bulk of them, I lived alone,*** in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only. I lived there two years and two months. At present I am a sojourner in civilized life again.
Blockquotes
Syntax
1Walden Pond, small pond (about 64 acres [26 hectares]) in Concord town (township), Middlesex county, eastern Massachusetts, U.S. It lies just south of the village of Concord in Walden Pond State Reservation (304 acres [123 hectares]). The pond was immortalized by Henry David Thoreau, who retreated there (1845–47) from society prior to writing Walden; or, Life in the Woods. In "Where I Lived, and What I Lived For," the second chapter of the book, Thoreau wrote:
2
3> I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. I did not wish to live what was not life, living is so dear; nor did I wish to practise resignation, unless it was quite necessary. I wanted to live deep and suck out all the marrow of life, to live so sturdily and Spartan-like as to put to rout all that was not life, to cut a broad swath and shave close, to drive life into a corner, and reduce it to its lowest terms, and, if it proved to be mean, why then to get the whole and genuine meanness of it, and publish its meanness to the world; or if it were sublime, to know it by experience, and be able to give a true account of it in my next excursion. For most men, it appears to me, are in a strange uncertainty about it, whether it is of the devil or of God, and have somewhat hastily concluded that it is the chief end of man here to "glorify God and enjoy him forever."
Walden Pond, small pond (about 64 acres [26 hectares]) in Concord town (township), Middlesex county, eastern Massachusetts, U.S. It lies just south of the village of Concord in Walden Pond State Reservation (304 acres [123 hectares]). The pond was immortalized by Henry David Thoreau, who retreated there (1845–47) from society prior to writing Walden; or, Life in the Woods. In “Where I Lived, and What I Lived For,” the second chapter of the book, Thoreau wrote:
I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. I did not wish to live what was not life, living is so dear; nor did I wish to practise resignation, unless it was quite necessary. I wanted to live deep and suck out all the marrow of life, to live so sturdily and Spartan-like as to put to rout all that was not life, to cut a broad swath and shave close, to drive life into a corner, and reduce it to its lowest terms, and, if it proved to be mean, why then to get the whole and genuine meanness of it, and publish its meanness to the world; or if it were sublime, to know it by experience, and be able to give a true account of it in my next excursion. For most men, it appears to me, are in a strange uncertainty about it, whether it is of the devil or of God, and have somewhat hastily concluded that it is the chief end of man here to “glorify God and enjoy him forever.”
Footnotes
Syntax
1When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only.<cite>[^1]</cite>I lived there two years and two months. At present I am a sojourner in civilized life again.<cite>[^2]</cite>
2
3[^1]: Thoreau wrote the first draft of Walden at the pond, but continued to work on the book for several more years. Irish laborers for the Fitchburg Railroad lived in shanties that were closer than a mile, but Thoreau did not considered them neighbors, because they moved soon after after the completion of the railroad.
4
5[^2]: E.B.White "borrowed" this from Thoreau, writing "At present I am a sojourner in the city again," in his "A Report in Spring" essay.
When I wrote the following pages, or rather the bulk of them, I lived alone, in the woods, a mile from any neighbor, in a house which I had built myself, on the shore of Walden Pond, in Concord, Massachusetts, and earned my living by the labor of my hands only.1I lived there two years and two months. At present I am a sojourner in civilized life again.2
Link
Syntax
1Link: [Hugo](https://gohugo.io)
2
3Website: <https://gohugo.io>
4
5Email: <13050082@qq.com>
Link: Hugo
Website: https://gohugo.io
Email: 13050082@qq.com
Lists
Ordered Lists
Syntax
11. First item
22. Second item
33. Third item
44. Fourth item
- First item
- Second item
- Third item
- Fourth item
Unordered Lists
Syntax
1- First item
2- Second item
3- Third item
4- Fourth item
- First item
- Second item
- Third item
- Fourth item
Nested Lists
Syntax
11. First item
2 - First item
3 - Second item
4 - Third item
52. Second item
6 - First item
7 - Second item
83. Third item
9 - First item
10 - Second item
- First item
- First item
- Second item
- Third item
- Second item
- First item
- Second item
- Third item
- First item
- Second item
Image
Syntax
1![Image](https://cn.bing.com/th?id=OHR.Borovets_ZH-CN5914681811_1920x1200.jpg&rf=LaDigue_1920x1200.jpg "Description of Image")
Code
Syntax
1Shortcodes have access to parameters delimited in the shortcode declaration via `.Get`, page- and site-level variables, and also the following shortcode-specific fields.
Shortcodes have access to parameters delimited in the shortcode declaration via .Get
, page- and site-level variables, and also the following shortcode-specific fields.
Code Blocks
Syntax
1```
2<!doctype html>
3<html lang="en">
4 <head>
5 <meta charset="utf-8">
6 <title>Example HTML5 Document Example</title>
7 </head>
8 <body>
9 <p>Test</p>
10 </body>
11</html>
12```
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>Example HTML5 Document Example</title>
6 </head>
7 <body>
8 <p>Test</p>
9 </body>
10</html>
Syntax
1```html
2<!doctype html>
3<html lang="en">
4 <head>
5 <meta charset="utf-8">
6 <title>Example HTML5 Document</title>
7 </head>
8 <body>
9 <p>Test</p>
10 </body>
11</html>
12```
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>Example HTML5 Document</title>
6 </head>
7 <body>
8 <p>Test</p>
9 </body>
10</html>
Syntax
1```js
2$(window).scroll(function(){
3 // Single page button for totoc
4 if($(window).scrollTop()>300){
5 $('#totoc').fadeIn(250);
6 }
7 else {
8 $('#totoc').fadeOut(250);
9 };
10});
11```
1$(window).scroll(function(){
2 // Single page button for totoc
3 if($(window).scrollTop()>300){
4 $('#totoc').fadeIn(250);
5 }
6 else {
7 $('#totoc').fadeOut(250);
8 };
9});
Table
Syntax
1<div class="container-fluid">
2
3|No |YEAR |PORULATION|URBAN|RURAL| URBAN/TOTAL|
4| --- |--- | --- | --- | --- | --- |
5|1 |2005 |130756 |56212 |74544 |43.0 |
6|2 |2006 |131448 |58288 |73160 |44.3 |
7|3 |2007 |132129 |60633 |71496 |45.9 |
8|4 |2008 |132802 |62403 |70399 |47.0 |
9|5 |2009 |133450 |64512 |68938 |48.3 |
10|6 |2010 |134091 |66978 |67113 |49.9 |
11|7 |2011 |134916 |69927 |64989 |51.8 |
12|8 |2012 |135922 |72175 |63747 |53.1 |
13
14</div>
No | YEAR | PORULATION | URBAN | RURAL | URBAN/TOTAL |
---|---|---|---|---|---|
1 | 2005 | 130756 | 56212 | 74544 | 43.0 |
2 | 2006 | 131448 | 58288 | 73160 | 44.3 |
3 | 2007 | 132129 | 60633 | 71496 | 45.9 |
4 | 2008 | 132802 | 62403 | 70399 | 47.0 |
5 | 2009 | 133450 | 64512 | 68938 | 48.3 |
6 | 2010 | 134091 | 66978 | 67113 | 49.9 |
7 | 2011 | 134916 | 69927 | 64989 | 51.8 |
8 | 2012 | 135922 | 72175 | 63747 | 53.1 |
Other Elements
Abbreviation
Syntax
1<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
GIF is a bitmap image format.
Subscript
Syntax
1H<sub>2</sub>O
H2O
Superscript
Syntax
1X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Xn + Yn = Zn
Keybord
Syntax
1Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>DEL</kbd> to end the session.
Press CTRL+ALT+DEL to end the session.
Mark
Syntax
1Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures.
-
Thoreau wrote the first draft of Walden at the pond, but continued to work on the book for several more years. Irish laborers for the Fitchburg Railroad lived in shanties that were closer than a mile, but Thoreau did not considered them neighbors, because they moved soon after after the completion of the railroad. ↩︎
-
E.B.White “borrowed” this from Thoreau, writing “At present I am a sojourner in the city again,” in his “A Report in Spring” essay. ↩︎