博客功能测试

本文用于测试博文各个插件的表现效果。包括Markdown Extra、Latex、语法高亮、评论。

Markdown

链接

This is an example inline link.

This is an example reference-style link.

强调

single asterisks

single underscores

double asterisks

double underscores

Blockquotes

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Tip: To use Highlight.js instead of Prettify, just configure the Markdown Extra extension in the Settings dialog.

Markdown Extra

注脚

这就是注脚^1

表格

表格的语法,支持各种对齐方式。

Item Value Qty
Computer 1600 USD 5
Phone 12 USD 12
Pipe 1 USD 234

代码

try this code. 内部的代码if ab is None是什么样子的呢?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from codecs import open
from collections import defaultdict
from functools import partial
from itertools import chain, groupby
from operator import attrgetter, itemgetter

class Generator(object):
"""Baseclass generator"""

def __init__(self, context, settings, path, theme, output_path, **kwargs):
self.context = context
self.settings = settings
self.path = path
self.theme = theme
self.output_path = output_path

for arg, value in kwargs.items():
setattr(self, arg, value)

def get_template(self, name):
"""Return the template by name.
Use self.theme to get the templates to use, and return a list of
templates ready to use with Jinja2.
"""
if name not in self._templates:
try:
self._templates[name] = self.env.get_template(name + '.html')
except TemplateNotFound:
raise Exception('[templates] unable to load %s.html from %s'
% (name, self._templates_path))
return self._templates[name]

代码完毕