This is a global warnning message

Markup Styles

This page is showing markup styles, they have no meanings.


Debug Note

The default admonition has no colors. It is gray.


Attention please!


Attention please!


This is a danger area.


This is an error message.


This is hint message.


This is an impoartant message.


This page is showing markup styles, they have no meanings.

Oh. Except this message.


A small tip please.


Please don’t do anything harmful to me.

Sphinx Admonition

New in version 2.5: The spam parameter.

Changed in version 2.5: The spam parameter.

Deprecated since version 3.1: Use spam() instead.

See also

It is also available at


  • A list of
  • short items
  • that should be
  • displayed
  • horizontally

Block Level


Here is an example on code highlight:

@app.route('/', methods=['GET')
def hello(name='world'):
    return 'Hello {}'.format(name)

class API(object):
    """API docstring style"""

    def __init__(self, request):
        # comment
        self.request = request

Using code-block with other options.

function test() {
fn main() {
    println!("Hello World!");


Here is an example on block quote:

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea – let’s do more of those!


  • Make a list, and its items
    1. Ordered item: foo
      1. A third level item
    2. Ordered item: bar
  • The second item has no items
  • The third item has unordered items
    • A foo is a foo
    • A bar is a bar

Options Lists

-a command-line option “a”
-b file options can have arguments and long descriptions
--long options can be long also
--input=file long options can also have arguments
/V DOS/VMS-style options too

Inline Style

A plain text mixed with bold and italic. And we have code too.

Let’s try a link


Plain text Typical result Footnote references, like [5]. Note that footnotes may get rearranged, e.g., to the bottom of the “page”.

Autonumbered footnotes are possible, like using [1] and [2].

They may be assigned ‘autonumber labels’ - for instance, [4] and [3].

[5]A numerical footnote. Note there’s no colon after the ].
[1]This is the first one.
[2]This is the second one.
[3]a.k.a. third
[4]a.k.a. fourth


Citation references, like [CIT2002]. Note that citations may get rearranged, e.g., to the bottom of the “page”.

[CIT2002]A citation (as often used in journals).


Let’s have a preview of what badges look like:

  • done Add badge role
  • todo Add more badge features
  • doing Things that in plan
  • remove Some feature has been removed


API References


Shortcut for users to access this theme. If you are using Sphinx < 1.7, you can add it into html_theme_path:

import sphinx_typlog_theme
html_theme_path = [sphinx_typlog_theme.get_path()]
Returns:theme path
sphinx_typlog_theme.add_github_roles(app, repo)

Add gh role to your sphinx documents. It can generate GitHub links easily:

:gh:`issue#57` will generate the issue link
:gh:`PR#85` will generate the pull request link

Use this function in to enable this feature:

def setup(app):
    sphinx_typlog_theme.add_github_roles(app, 'lepture/authlib')
  • app – sphinx app
  • repo – GitHub repo, e.g. “lepture/authlib”

Add badge role to your sphinx documents. It can create a colorful badge inline.