Some cool stuffs from Theme NexT Tag doc, Hexo Tag Plugins doc and GitHub Markdown doc.
Note
{% note %}
#### Header
(without define class style)
{% endnote %}
{% 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 %}
{% note success %}
#### Codeblock in note
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}
{% note default %}
#### Lists in note
* ul
* ul
* ul
* ul
* ul
1. ol
2. ol
1. ol
2. ol
3. ol
{% endnote %}
{% note default %}
#### Table in Note
| 1 | 2 | 3 | 4 |
| - | :-: | :- | -: |
| 4 | 5 | 6 | 7 |
| 8 | 9 | 10 |
| Default | Align center | Align left | Align right |
{% endnote %}
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.
{% 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 %}
1 | _.compact([0, 1, false, 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 %}
1 | var allp=$("div p"); |
1 | allp.each(function(){ |
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);
});
```
1 | var allp=$("div p"); |
Backtick Code Block
``` [language] [title] [url] [link text] code snippet ```
``` py Python
def foo():
if not bar:
return True
```
1 | def foo(): |