This is a global warnning message

Markup Styles

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

Admonition

Debug Note

The default admonition has no colors. It is gray.

Attention

Attention please!

Caution

Attention please!

Danger

This is a danger area.

Error

This is an error message.

Hint

This is hint message.

Important

This is an impoartant message.

Note

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

Oh. Except this message.

Tip

A small tip please.

Warning

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 https://typlog.com/

LICENSE AGREEMENT

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

Block Level

Code

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.

test.js
function test() {
  console.log('hi');
}
1
2
3
fn main() {
    println!("Hello World!");
}

Quote

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!

List

  • 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 https://lepture.com.

Footnotes

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

Citations

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).

Badges

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

GitHub

API References

sphinx_typlog_theme.get_path()

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 conf.py to enable this feature:

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

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