Everkm Markdown

Everkm adds some commonly used features on the basis of standard Markdown and GitHub Markdown to enrich the usage scenarios of Markdown.

Markdown standard syntax

Reference: https://daringfireball.net/projects/markdown/syntax

Title

## Primary heading
## Secondary headings
### Tertiary headings
#### Fourth-level headings
##### Level 5 headings
###### Level 6 heading

Paragraph

Paragraphs are separated by two carriage returns. One carriage return is used only to split text and has no effect on the front-end presentation. Two consecutive line feeds create a paragraph. When two spaces are typed before a linefeed, the front-end presentation is an in-paragraph linefeed, also known as a soft linefeed. See this line for the actual effect.

List

There are unordered lists, which are implemented as * or - , both followed by a space. Ordered lists are implemented as numeric numbers or 1. , also followed by a space, and are automatically renumbered sequentially by the front-end. Multi-level lists are indented with two or four extra spaces before each level.

* Unordered list 1
* Unordered list 2
* Unordered list 3

- Unordered list mode 1
- Unordered list mode 2
- Unordered list mode 3

1. ordered list 1
1. ordered list 2
1. ordered list 3 
1. can be numbered sequentially or with all 1's
    The numbering is automatically corrected in the final rendering.
    If preceded by an indent, it will automatically fall into the range of the previous list item.


- 1 Multi-level list
    - 1.1 Multi-level list
    - 1.2 Multi-level list
- 2 Multilevel lists
- 3 Multilevel list

Emphasize

Emphasize, also called italicize, using *asterisks* or _underscores_.

For emphasis, also called bold, use **asterisk** or __underline__.

Combined emphasis, also called bold italic, using **asterisk and _underline_** or ***combined emphasis***

- and * have the same effect.

Link

[inline link](https://note.everkm.com)

[inline link with title](https://note.everkm.com "Everkm Notes")

[citation style link][arbitrary case-insensitive reference text]

Or leave it empty and write nothing [link text itself]

The address of the referenced link can follow.

[link text itself]: https://note.everkm.com
[arbitrary case-insensitive reference text]: https://note.everkm.com

Pictures

1. Inline
! [alt text](https://example.com/logo.png "Picture Title")

2. Quote
! [alt text][picture]

The quote is followed by

[picture]: https://example.com/logo.png "Picture Title"

Code


An in-line code wrapped in backquotes

`Inline code`


Line-wrapped code blocks with three backquotes ```

``` javascript
console.log('Code block + syntax highlighting')
```

```
No language is specified, so no syntax highlighting.
Let's try a random tag <b>tag</b>
```

Horizontal split line

Three or more -

---

Blockquote

> Quoting content
> Other Markdown formats can be used in block references
> > Nested quotes

Github Markdown extended syntax

From: https://github.github.com/gfm/

Strikeout lines

~~ strikethrough ~~

Task list

- [ x] Write the press release
- [ ] Update the website
- [ ] Contact the media

Automatically convert links

<https://www.everkm.com>

Footnotes

It is sometimes useful to include a non-hyperlinked footnote visible to the reader. Implemented using the [^number|letter underscore combination] method, characters can be followed by a number, or a combination of letters and underscores or underscores, and the system automatically renumbers them sequentially when rendering.

Text prior to footnote reference.[^2]
[^2]: Comment to include in footnote.

Tables

Colons can be used for their columns and can be omitted.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |


The external pipe character (|) is optional and does not need to be neatly aligned. It is also possible to inline other Markdown in the table.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Definition Lists

Apple

:   Pomaceous fruit of plants of the genus Malus in 
    the family Rosaceae.

Orange

:   The fruit of an evergreen tree of the genus Citrus.

Everkm Markdown Extension

Macros

TOC (Table of content)

Automatically generates a table of contents (TOC) index for the current page. See the beginning of this page for the effect.

[TOC]

{{everkm::toc()}}

{{everkm::toc(level=1)}}

Parameters:

  • level Optional. The title level of the search, default level=3.

Include external files

Include the content of the specified file when rendering. Only common plain text files with common extensions such as md, txt, csv, js and other program source files are allowed.

Parameters.

  • file Absolute (based on the project root directory) or relative path to the file.
  • as Optional. Output format. Range of values:
    1. plain (default), output as is when rendering.
    2. table Attempts to parse as a table.
    3. code Code block
    4. md or markdown, parse as markdown.
  • code_lang optional. Programming language, valid only for as="code".
  • table_header Optional. Whether the first row is a table header, valid only if as="table".
  • table_merge Optional. Whether to merge cells automatically. If the value and cell content are same, then merge them, the order of merging is column first, then row. For example, to merge all empty cells, use merge_cell="". Valid only if as="table".
  • csv_delimiter Optional. Specifies the csv delimiter, default ,.

Embedding external Markdown files:

{{everkm::include(file="_include_test.inc.md", as="md")}}

Includes external table:

All cells whose contents are * signs are automatically merged and extended properties are added.

{align=center}
{{everkm::include(file="demo.csv", as="table", table_header=true, table_merge="*")}}

Including external code:

{{everkm::include(file="_xx.js", as="code", code_lang="js")}}

For jumping files within a project. Supports links to non-HTML pages, such as PDF documents, which are automatically copied to a static resource directory on output.

[[filename]]

[[directory/filename]]

When the subject (double bracketed as topic) has only one title, the entire content directory is looked up, and files with the same name (ignoring the .md extension) are matched successfully. If there is more than one file with the same name, the first one is returned. To avoid this kind of same-name locating, you can put a directory qualification in front of it. Directories are recognized in the following ways:

  1. Starting with / indicates a strict match to the project root directory.
  2. starting with ./ (the current file directory) or ../ (current file's parent directory) indicates relative positioning based on the current file.
  3. Except the above, match all files in the project with the file name as the suffix.

In-page anchor

For jumping between different headings within a page.

Anchor will be generated automatically for headings, you can define the ID by id=identity, default use headings content-addressing 1 as the anchor name, you can use #id in links to realize the in-page anchor jumping.

Block extension attributes

A set of attributes immediately preceding the block, on a separate line, wrapped in curly braces. E.g.:

{color=red tc}
# The red color of the title

The attribute set supports the following attributes:

  1. #tag Add Tag tag, support Chinese language
  2. .class Add CSS style name (class) attribute
  3. tl, tc, tr left-aligned, center-aligned, right-aligned in that order.
  4. ul or underline adds underlining.
  5. color=red add text color
  6. bgcolor=red add background color
  7. font=Arial fonts.
  8. pa=1em, px=1em, py=1em for internal spacing around, horizontal spacing, vertical spacing in that order.
  9. corner=0.5em for rounded corner size, em for current text size.
  10. key=value Set other custom attributes.

Note: If there is a space or comma in value, it should be wrapped in double quotes.

Header Extension Attributes

{id=main-header}
## Main header

Paragraph Extension Attributes

{bgcolor="rgba(0,0,0,0.1)" color=blue underline pa=1em corner=0.5em}
Here's a block of sample content that has the extended attribute.

This is a block example content which has the extended attribute.

Table Extension Properties

{align=center .my-table}
| default-aligned | left-aligned | center-aligned | right-aligned |
| --- | :--- | :---: | ---: |
| Content | Content | Content | Content |
| Content | Content | Content | Content |
default-aligned left-aligned center-aligned right-aligned
Content Content Content Content
Content Content Content Content

In-line extended attributes

Wrap Region Extended Properties

Adds an attribute to the # wrapped region, with attribute set in front. The format is:

I am {color=red}#Quite a long# paragraph.

I am Quite a long paragraph.

Link

hello <https://www.everkm.com>{target=_blank color=red} world

[Everkm](https://www.everkm.com){color=orangered} link with extended attributes.

hello https://www.everkm.com world

Everkm link with extended attributes.

Image

![Air](https://images.unsplash.com/photo-1564979045531-fa386a275b27?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2532&q=80 "Blue skies and dogwoods"){corner=1em}

Preview

Air


Underline

{ul}#Underline#

Underline

Superscript

E=MC^2^

E=MC2

Subscripts

H~2~O

H2O

Highlighting

I need to highlight these ==very important words==.

I need to highlight these very important words.

HTML output

I need to highlight these <mark>very important words</mark>.

Special character replacement

| => &#124;
> => &gt;
< => &lt;
(C) © Copyright
(TM) ™ Trademarks
(R) ® Registered Trademarks
-- -- Dashes
... ...apostrophes
-> → right arrow
<- ← left arrow
=> ⇒ right double arrow
<= ⇐ left double arrow

Common symbols

  1. HTML special symbols
  2. emoji symbols
emoji

:+1:

👍 👉 Find emoji emoticons 😄 💪 .

definitions

Attribute set

A collection of attributes wrapped in curly braces, with multiple attributes separated by spaces or commas.

Reference

  1. Convert text to valid link characters. English alphanumerics are left as is, spaces are replaced with -, and each Chinese character is converted to pinyin and then linked using -. Note: exclamation:: There is no hyphen - in alphanumeric+Chinese links, if you need it, please add an English space in the middle.