This post uses hexo-renderer-markdown-it plugin as markdown processor, so please install it to achieve the effect.
installation
1 2 3 4 5 6
npm un hexo-renderer-marked --save npm i hexo-renderer-markdown-it --save npm i markdown-it-emoji --save npm i markdown-it-mark --save npm i markdown-it-deflist --save npm i markdown-it-container --save
> Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows.
Blockquotes can also be nested…
…by using additional greater-than signs right next to each other…
…or with spaces between arrows.
Lists
Unordered
source code
1 2 3 4 5 6 7
+ Create a list by starting a line with `+`, `-`, or `*` + Sub-lists are made by indenting 2 spaces: - Marker character change forces new list start: * Ac tristique libero volutpat at + Facilisis in pretium nisl aliquet - Nulla volutpat aliquam velit + Very easy!
Create a list by starting a line with +, -, or *
Sub-lists are made by indenting 2 spaces:
Marker character change forces new list start:
Ac tristique libero volutpat at
Facilisis in pretium nisl aliquet
Nulla volutpat aliquam velit
Very easy!
Ordered
source code
1 2 3 4 5 6
1. Lorem ipsum dolor sit amet 1. Indented list 1. Another level 2. Indent 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa
Lorem ipsum dolor sit amet
Indented list 1. Another level
Indent
Consectetur adipiscing elit
Integer molestie lorem at massa
source code
1 2
1. You can use sequential numbers... 1. ...or keep all the numbers as `1.`
You can use sequential numbers…
…or keep all the numbers as 1.
Start numbering with offset:
source code
1 2
57. foo 1. bar
foo
bar
Code
source code
1
Inline `code`
Inline code
Indented code
source code
1 2 3 4
// Some comments line 1 of code line 2 of code line 3 of code
// Some comments
line 1 of code
line 2 of code
line 3 of code
Block code “fences”
source code
1 2 3
``` Sample text here... ```
1
Sample text here...
Syntax highlighting
source code
1 2 3 4 5 6 7
``` js sample.js var foo = function (bar) { return bar++; };
console.log(foo(5)); ```
sample.js
1 2 3 4 5
var foo = function (bar) { return bar++; };
console.log(foo(5));
Tables
source code
1 2 3 4 5
| Option | Description |Description | Description | Description | Description | | ------ | ----------- |----------- | ----------- | ----------- | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. |
Option
Description
Description
Description
Description
Description
data
path to data files to supply the data that will be passed into templates.
engine
engine to be used for processing templates. Handlebars is the default.
ext
extension to be used for dest files.
Right aligned columns
source code
1 2 3 4 5
| Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. |
Option
Description
data
path to data files to supply the data that will be passed into templates.
engine
engine to be used for processing templates. Handlebars is the default.
{% blockquote David Levithan, Wide Awake %} Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy. {% endblockquote %}
Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
Blockquote for twitter
source code
1 2 3
{% blockquote @DevDocs https://twitter.com/devdocs/status/356095192085962752 %} NEW: DevDocs now comes with syntax highlighting. http://devdocs.io {% endblockquote %}
{% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %} Every interaction is both precious and an opportunity to delight. {% endblockquote %}
Every interaction is both precious and an opportunity to delight.