Demonstration

This page links to pre-rendered HTML snapshots of several RST documents, alongside the raw RST source files that produced them. The HTML files were generated by saving the Rich console output with --save-html.

Rendered output

Each link opens the terminal-styled HTML export of the rendered document.

Raw RST source

The original RST files used as input.

How the demos were generated

All files except rich_introduction.rst were rendered with the following command (substitute filename as appropriate):

On Linux/macOS:

rich_rst ./demo/filename.rst \
    --save-html ./demo/filename.html \
    --code-theme dracula \
    --default-lexer rst  \
    --soft-wrap \
    --hide-errors

On Windows:

rich_rst .\demo\filename.rst ^
    --save-html .\demo\filename.html ^
    --code-theme dracula ^
    --default-lexer rst  ^
    --soft-wrap ^
    --hide-errors

Note

Short aliases are available for all flags — run python -m rich_rst --help to see the full list.

For rich_introduction.rst the --default-lexer flag was set to python instead of rst.

Sources

The demo RST files are adapted from official documentation.

File

Original HTML

Original RST

directives.rst

directives.html

directives.txt

specification.rst

restructuredtext.html

restructuredtext.txt

introduction.rst

introduction.html

introduction.txt

roles.rst

roles.html

roles.txt

rich_introduction.rst

Rich introduction

introduction.rst