Written in Markdown

Introduction

Markdown is a type of markup language that allows users to write structured documents using a simple notation.

Markdown has the most basic “source syntax,” but since it has very limited functionality, each Markdown processor has its own extensions. As a result, various “dialects” of Markdown have been created.

In most cases, the original syntax can be used with any Markdown processor. Since PureBuilder Simply can use a variety of document processors, the valid syntax depends on the document processor used and its settings.

The sample output here is basically generated using Pandoc.

Original Markdown Syntax

Paragraph

Text with an intervening blank line is a paragraph.

Non-blank line breaks are generally treated as just whitespace; in HTML, line breaks are also treated as just whitespace, so they are usually left as line breaks when converted to HTML, and not converted to <br>.

Para
graph1

Paragraph2
<p>Para graph1</p>
<p>Paragraph2</p>

Headings

Lines beginning with # and a space are headings. The number of #s is the heading level, # for h1, ## for h2.

Depending on the capabilities of your document processor, this correspondence may be offset.

# Heading1

Paragraph
<h1 id="Heading1">Heading1</h1>
<p>Paragraph</p>

You can put a link in the form of [link text](URL).

[PureBuilder Simply](https://github.com/reasonset/purebuilder-simply)
<p><a href="https://github.com/reasonset/purebuilder-simply">PureBuilder
Simply</a></p>

Image

You can put an image in the format ![text](URL).

The text is usually the alt attribute of the img element. In Pandoc, a paragraph consisting of a single image is combined with figure.

This is ![Logo](/img/logo.png)
<p>This is <img src="/img/logo.png" alt="Logo" /></p>

Quoting

A paragraph consisting of > and a line beginning with a space is considered a quotation.

What is PureBuilder

> PureBuilder is website building script.
<p>What is PureBuilder</p>
<blockquote>
<p>PureBuilder is website building script.</p>
</blockquote>

Lists

A paragraph consisting of `* and a line beginning with a space is a list.

* No.1
* No.2
* No.3
<ul>
<li>No.1</li>
<li>No.2</li>
<li>No.3</li>
</ul>

List can be nested when indented by four spaces.

* No.1
    * No.1-1
    * No.1-2
* No.2

In addition to *, you can also use - and +, but some Markdown processors may not support them.

* No.1
    - No.1-1
    - No.1-2
* No.2

Ordered list

Paragraphs consisting of lines beginning with a number and a space are ordered list.

1. No.1
1. No.2
1. No.3
<ol type="1">
<li>No.1</li>
<li>No.2</li>
<li>No.3</li>
</ol>

It may be written as 1., 2., 3., etc., but it is not required to do so.

Emphasis

Text enclosed in * is the em equivalent of emphasis.

This is *emphasis.*
<p>This is <em>emphasis.</em></p>

Text enclosed in ** is the strong equivalent of emphasis.

Tihs is **strong emphasis.**
<p>This is <strong>strong emphasis.</strong></p>

Code and Code block

Text enclosed in backquotes is treated as a code string.

Pandoc command is `pandoc`.
<p>Pandoc command is <code>pandoc</code>.</p>

Text surrounded by lines of three or more backquotes is treated as a code block. Since there is no element in HTML that represents a code block, it is represented by a combination of the code element and a block element or the pre element.

```
echo Hello, world.
```
<pre><code>echo Hello, world.</code></pre>

Other Markdown reference

Last updated: 2024-03-31