Hexo Cool Stuffs I

Some cool stuffs from Theme NexT Tag doc, Hexo Tag Plugins doc and GitHub Markdown doc.

Note

{% note %}
#### Header
(without define class style)
{% endnote %}

(without define class style)

{% note default %}
#### Default Header
Welcome to [Hexo!](https://hexo.io)
{% endnote %}

Default Header

Welcome to Hexo!

{% note primary %}
#### Primary Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Primary Header

Welcome to Hexo!

{% note info %}
#### Info Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Info Header

Welcome to Hexo!

{% note warning %}
#### Warning Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Warning Header

Welcome to Hexo!

{% note danger %}
#### Danger Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Danger Header

Welcome to Hexo!

{% note info no-icon %}
#### No icon note
Note **without** icon: `note info no-icon`
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}

No icon note

Note without icon: note info no-icon

1
2
3
code block in note tag
code block in note tag
code block in note tag
{% note success %}
#### Codeblock in note
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}

Codeblock in note

1
2
3
code block in note tag
code block in note tag
code block in note tag
{% note default %}
#### Lists in note
* ul
* ul
  * ul
  * ul
* ul

1. ol
2. ol
  1. ol
  2. ol
3. ol
{% endnote %}

Lists in note

  • ul
  • ul
    • ul
    • ul
  • ul
  1. ol
  2. ol
  3. ol
  4. ol
  5. ol
{% note default %}
#### Table in Note
| 1 | 2 | 3 | 4 |
| - | :-: | :- | -: |
| 4 | 5 | 6 | 7 |
| 8 | 9 | 10 |
| Default | Align center | Align left | Align right |
{% endnote %}

Table in Note

1234
4567
8910
DefaultAlign centerAlign leftAlign right

Quotes

Blockquote

{% blockquote [author[, source]] [link] [source_link_title] %}
content
{% endblockquote %}

Examples:

{% 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.

David LevithanWide Awake
{% blockquote @DevDocs https://twitter.com/devdocs/status/356095192085962752 %}
NEW: DevDocs now comes with syntax highlighting. http://devdocs.io
{% endblockquote %}

NEW: DevDocs now comes with syntax highlighting. http://devdocs.io

{% 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.

Other quotes

As Kanye West said:
> We're living the future so
> the present is our past.

As Kanye West said:

We’re living the future so
the present is our past.

I think you should use an
`<addr>` element here instead.

I think you should use an
<addr> element here instead.

{% centerquote %}Elegant in code, simple in core{% endcenterquote %}
or
{% cq %}Elegant in code, simple in core{% endcq %}    

Elegant in code, simple in core

Code Block

{% codeblock [title] [lang:language] [url] [link text] %}
code snippet
{% endcodeblock %}

Example

{% codeblock lang:objc %}
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}
1
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% codeblock _.compact http://underscorejs.org/#compact Underscore.js %}
_.compact([0, 1, false, 2, '', 3]);
=> [1, 2, 3]
{% endcodeblock %}
_.compactUnderscore.js
1
2
_.compact([0, 1, false, 2, '', 3]);
=> [1, 2, 3]
{% codeblock snippet 1 lang:js %}
var allp=$("div p");
allp.attr("class",function(i,n){
           return Number(n)+1;
      });
{% endcodeblock %}     
{% codeblock snippet 2 lang:js %}
allp.each(function(){
        console.log(this);
        });
{% endcodeblock %}

Two code block one after another

Right:

{% codeblock snippet 1 lang:js %}
var allp=$("div p");
allp.attr("class",function(i,n){
           return Number(n)+1;
      });
{% endcodeblock %}     
{% codeblock snippet 2 lang:js %}
allp.each(function(){
        console.log(this);
        });
{% endcodeblock %}
snippet 1
1
2
3
4
var allp=$("div p");
allp.attr("class",function(i,n){
return Number(n)+1;
});
snippet 2
1
2
3
allp.each(function(){
console.log(this);
});

Wrong:

```js snippet 1
var allp=$(“div p”);
allp.attr(“class”,function(i,n){
return Number(n)+1;
});
```

```js snippet 2
allp.each(function(){
console.log(this);
});
```

snippet 1
1
2
3
4
5
6
7
8
9
10
var allp=$("div p");
allp.attr("class",function(i,n){
return Number(n)+1;
});
```

```js snippet 2
allp.each(function(){
console.log(this);
});

Backtick Code Block

``` [language] [title] [url] [link text] code snippet ```

``` py Python
def foo():
if not bar:
return True
```

Python
1
2
3
def foo():
if not bar:
return True