Skip to content

Commit e7c71c0

Browse files
committed
Add test post
1 parent a7a6a0f commit e7c71c0

3 files changed

Lines changed: 354 additions & 45 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/public
22
zola.exe
3-
/content/posts/test/

content/posts/test/index.md

Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
+++
2+
title = "Markdown Test"
3+
description = "Markdown Test Description"
4+
date = 2050-01-01
5+
slug = "test"
6+
draft = true
7+
[taxonomies]
8+
tags = ["TagName"]
9+
[extra]
10+
mermaid = true
11+
+++
12+
13+
# Markdown: Syntax
14+
15+
**Note:** This document is itself written using Markdown; you
16+
can [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text).
17+
18+
----
19+
20+
## Overview
21+
22+
### Philosophy
23+
24+
Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
25+
26+
Readability, however, is emphasized above all else. A Markdown-formatted
27+
document should be publishable as-is, as plain text, without looking
28+
like it's been marked up with tags or formatting instructions. While
29+
Markdown's syntax has been influenced by several existing text-to-HTML
30+
filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),
31+
[Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of
32+
inspiration for Markdown's syntax is the format of plain text email.
33+
34+
## Block Elements
35+
36+
### Paragraphs and Line Breaks
37+
38+
A paragraph is simply one or more consecutive lines of text, separated
39+
by one or more blank lines. (A blank line is any line that looks like a
40+
blank line -- a line containing nothing but spaces or tabs is considered
41+
blank.) Normal paragraphs should not be indented with spaces or tabs.
42+
43+
The implication of the "one or more consecutive lines of text" rule is
44+
that Markdown supports "hard-wrapped" text paragraphs. This differs
45+
significantly from most other text-to-HTML formatters (including Movable
46+
Type's "Convert Line Breaks" option) which translate every line break
47+
character in a paragraph into a `<br />` tag.
48+
49+
When you *do* want to insert a `<br />` break tag using Markdown, you
50+
end a line with two or more spaces, then type return.
51+
52+
### Headers
53+
54+
Markdown supports two styles of headers, [Setext] [1] and [atx] [2].
55+
56+
Optionally, you may "close" atx-style headers. This is purely
57+
cosmetic -- you can use this if you think it looks better. The
58+
closing hashes don't even need to match the number of hashes
59+
used to open the header. (The number of opening hashes
60+
determines the header level.)
61+
62+
63+
### Blockquotes
64+
65+
Markdown uses email-style `>` characters for blockquoting. If you're
66+
familiar with quoting passages of text in an email message, then you
67+
know how to create a blockquote in Markdown. It looks best if you hard
68+
wrap the text and put a `>` before every line:
69+
70+
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
71+
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
72+
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
73+
>
74+
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
75+
> id sem consectetuer libero luctus adipiscing.
76+
77+
Markdown allows you to be lazy and only put the `>` before the first
78+
line of a hard-wrapped paragraph:
79+
80+
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
81+
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
82+
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
83+
84+
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
85+
id sem consectetuer libero luctus adipiscing.
86+
87+
Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
88+
adding additional levels of `>`:
89+
90+
> This is the first level of quoting.
91+
>
92+
> > This is nested blockquote.
93+
>
94+
> Back to the first level.
95+
96+
Blockquotes can contain other Markdown elements, including headers, lists,
97+
and code blocks:
98+
99+
> ## This is a header.
100+
>
101+
> 1. This is the first list item.
102+
> 2. This is the second list item.
103+
>
104+
> Here's some example code:
105+
>
106+
> return shell_exec("echo $input | $markdown_script");
107+
108+
Any decent text editor should make email-style quoting easy. For
109+
example, with BBEdit, you can make a selection and choose Increase
110+
Quote Level from the Text menu.
111+
112+
113+
### Lists
114+
115+
Markdown supports ordered (numbered) and unordered (bulleted) lists.
116+
117+
Unordered lists use asterisks, pluses, and hyphens -- interchangably
118+
-- as list markers:
119+
120+
* Red
121+
* Green
122+
* Blue
123+
124+
is equivalent to:
125+
126+
+ Red
127+
+ Green
128+
+ Blue
129+
130+
and:
131+
132+
- Red
133+
- Green
134+
- Blue
135+
136+
Ordered lists use numbers followed by periods:
137+
138+
1. Bird
139+
2. McHale
140+
3. Parish
141+
142+
It's important to note that the actual numbers you use to mark the
143+
list have no effect on the HTML output Markdown produces. The HTML
144+
Markdown produces from the above list is:
145+
146+
If you instead wrote the list in Markdown like this:
147+
148+
1. Bird
149+
1. McHale
150+
1. Parish
151+
152+
or even:
153+
154+
3. Bird
155+
1. McHale
156+
8. Parish
157+
158+
you'd get the exact same HTML output. The point is, if you want to,
159+
you can use ordinal numbers in your ordered Markdown lists, so that
160+
the numbers in your source match the numbers in your published HTML.
161+
But if you want to be lazy, you don't have to.
162+
163+
To make lists look nice, you can wrap items with hanging indents:
164+
165+
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
166+
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
167+
viverra nec, fringilla in, laoreet vitae, risus.
168+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
169+
Suspendisse id sem consectetuer libero luctus adipiscing.
170+
171+
But if you want to be lazy, you don't have to:
172+
173+
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
174+
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
175+
viverra nec, fringilla in, laoreet vitae, risus.
176+
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
177+
Suspendisse id sem consectetuer libero luctus adipiscing.
178+
179+
List items may consist of multiple paragraphs. Each subsequent
180+
paragraph in a list item must be indented by either 4 spaces
181+
or one tab:
182+
183+
1. This is a list item with two paragraphs. Lorem ipsum dolor
184+
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
185+
mi posuere lectus.
186+
187+
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
188+
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
189+
sit amet velit.
190+
191+
2. Suspendisse id sem consectetuer libero luctus adipiscing.
192+
193+
It looks nice if you indent every line of the subsequent
194+
paragraphs, but here again, Markdown will allow you to be
195+
lazy:
196+
197+
* This is a list item with two paragraphs.
198+
199+
This is the second paragraph in the list item. You're
200+
only required to indent the first line. Lorem ipsum dolor
201+
sit amet, consectetuer adipiscing elit.
202+
203+
* Another item in the same list.
204+
205+
To put a blockquote within a list item, the blockquote's `>`
206+
delimiters need to be indented:
207+
208+
* A list item with a blockquote:
209+
210+
> This is a blockquote
211+
> inside a list item.
212+
213+
To put a code block within a list item, the code block needs
214+
to be indented *twice* -- 8 spaces or two tabs:
215+
216+
* A list item with a code block:
217+
218+
<code goes here>
219+
220+
### Code Blocks
221+
222+
Pre-formatted code blocks are used for writing about programming or
223+
markup source code. Rather than forming normal paragraphs, the lines
224+
of a code block are interpreted literally. Markdown wraps a code block
225+
in both `<pre>` and `<code>` tags.
226+
227+
To produce a code block in Markdown, simply indent every line of the
228+
block by at least 4 spaces or 1 tab.
229+
230+
This is a normal paragraph:
231+
232+
This is a code block.
233+
234+
Here is an example of AppleScript:
235+
236+
tell application "Foo"
237+
beep
238+
end tell
239+
240+
A code block continues until it reaches a line that is not indented
241+
(or the end of the article).
242+
243+
Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
244+
are automatically converted into HTML entities. This makes it very
245+
easy to include example HTML source code using Markdown -- just paste
246+
it and indent it, and Markdown will handle the hassle of encoding the
247+
ampersands and angle brackets. For example, this:
248+
249+
<div class="footer">
250+
&copy; 2004 Foo Corporation
251+
</div>
252+
253+
Regular Markdown syntax is not processed within code blocks. E.g.,
254+
asterisks are just literal asterisks within a code block. This means
255+
it's also easy to use Markdown to write about Markdown's own syntax.
256+
257+
```
258+
tell application "Foo"
259+
beep
260+
end tell
261+
```
262+
263+
## Span Elements
264+
265+
### Links
266+
267+
Markdown supports two style of links: *inline* and *reference*.
268+
269+
In both styles, the link text is delimited by [square brackets].
270+
271+
To create an inline link, use a set of regular parentheses immediately
272+
after the link text's closing square bracket. Inside the parentheses,
273+
put the URL where you want the link to point, along with an *optional*
274+
title for the link, surrounded in quotes. For example:
275+
276+
This is [an example](http://example.com/) inline link.
277+
278+
[This link](http://example.net/) has no title attribute.
279+
280+
### Emphasis
281+
282+
Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
283+
emphasis. Text wrapped with one `*` or `_` will be wrapped with an
284+
HTML `<em>` tag; double `*`'s or `_`'s will be wrapped with an HTML
285+
`<strong>` tag. E.g., this input:
286+
287+
*single asterisks*
288+
289+
_single underscores_
290+
291+
**double asterisks**
292+
293+
__double underscores__
294+
295+
### Code
296+
297+
To indicate a span of code, wrap it with backtick quotes (`` ` ``).
298+
Unlike a pre-formatted code block, a code span indicates code within a
299+
normal paragraph. For example:
300+
301+
Use the `printf()` function.
302+
303+
304+
## Footnotes
305+
306+
Here's a simple footnote,[^1] and here's a longer one.[^bignote]
307+
308+
[^1]: This is the first footnote.
309+
310+
[^bignote]: Here's one with multiple paragraphs and code.
311+
312+
Indent paragraphs to include them in the footnote.
313+
314+
`{ my code }`
315+
316+
Add as many paragraphs as you like.
317+
318+
319+
{% info() %}
320+
Info Box
321+
{% end %}
322+
323+
{% tip() %}
324+
Tip Box
325+
{% end %}
326+
327+
{% warning() %}
328+
Warning Box
329+
{% end %}
330+
331+
{% danger() %}
332+
Danger Box
333+
{% end %}
334+
335+
{% mermaid() %}
336+
sequenceDiagram
337+
participant Alice
338+
participant Bob
339+
Alice->>John: Hello John, how are you?
340+
loop Healthcheck
341+
John->>John: Fight against hypochondria
342+
end
343+
Note right of John: Rational thoughts <br/>prevail...
344+
John-->>Alice: Great!
345+
John->>Bob: How about you?
346+
Bob-->>John: Jolly good!
347+
{% end %}
348+
349+
## Lorum ipsum
350+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
351+
352+
### Blockquote
353+
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
354+

0 commit comments

Comments
 (0)