Skip to main content

Marquedown

Extending Markdown further by adding a few more useful notations.

It uses markdown2 to implement common syntax via its extras.

Examples

Blockquote with citation

This is currently limited to the top scope with no indentation. Surrounding dotted lines are optional.

Example

Marquedown
......................................................
> You have enemies? Good. That means you've stood up
> for something, sometime in your life.
-- Winston Churchill
''''''''''''''''''''''''''''''''''''''''''''''''''''''
HTML
<blockquote>
    <p>
        You have enemies? Good. That means you've stood up
        for something, sometime in your life.
    </p>
    <cite>Winston Churchill</cite>
</blockquote>

Embed video

YouTube

Marquedown
![dimweb](https://youtu.be/VmAEkV5AYSQ "An embedded YouTube video")
HTML
<iframe
    src="https://www.youtube.com/embed/VmAEkV5AYSQ"
    title="An embedded YouTube video" frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
    allowfullscreen>
</iframe>

BBCode HTML tags

These tags allow you to put Marquedown inside HTML tags. This is done by finding and replacing them with their represented HTML after all other Marquedown has been rendered.

Tags and classes

The naming scheme is the same as in CSS, e.g. tag.class1.class2 If tag is omitted, it is treated to be div

ID:s

ID:s are supported using #beans at the end of the tag, ex. [p#beans]

Example

Marquedown
[section]
[.bingo]
A regular **paragraph** written in Marquedown, but *within* other HTML tags.
[//]

[tag.class1.class2] [/tag]
HTML
<section>
<div class="bingo">
    <p>
        A regular <strong>paragraph</strong> written in Marquedown, but <em>within</em> other HTML tags.
    </p>
</div></section>

<tag class="class1 class2"> </tag>

Label list

Example

Marquedown
(| email: [jon@webby.net](mailto:jon@webby.net)
(| matrix: [@jon:webby.net](https://matrix.to/#/@jon:webby.net)
(| runescape: jonathan_superstar1777
HTML
<ul class="labels">
    <li class="label label-email">
        <a href="mailto:jon@webby.net">
            jon@webby.net
        </a>
    </li>
    <li class="label label-matrix">
        <a href="https://matrix.to/#/@jon:webby.net">
            @jon:webby.net
        </a>
    </li>
    <li class="label label-runescape">
        jonathan_superstar1777
    </li>
</ul>

QR codes

QR codes can be generated and referenced automatically via the render command. If you want to generate QR codes with marquedown.marquedown, you can follow the example below.

Example

Python
from marquedown import marquedown
from marquedown.qr import QRGenerator

with open('public/document.mqd', 'r') as f:
    document = f.read()

with open('public/document.html', 'w') as f:
    qrgen = QRGenerator('public/qr', 'qr')
    rendered = marquedown(document, qrgen=qrgen)
    f.write(rendered)
Marquedown
![qr:monero-wallet](monero:abcdefghijklmnopqrstuvwxyz)

[o] Bee Movie transcript ..................[o]
| According to all known laws of aviation,
| there is no way that a bee should be able
| to fly. Its wings are too small to get its
| fat little body off the ground. The bee,
| of course, flies anyway because bees don't
| care what humans think is impossible.
[o]
HTML
<img src="qr/qr-monero-wallet.png" alt="monero-wallet">

<img class="qr" src="qr/qr-bee-movie-transcript.png" alt="Bee Movie transcript">

Commands

render: Render documents

You can render an entire directory and its subdirectories of Markdown or Marquedown documents. This can be used to automate rendering pages for your website.

Do python -m marquedown render --help for list of options.

Example

For a few of my websites hosted on GitLab, I have it set up to run this on push:

# Render document
python -m marquedown render -i "./mqd" -o "./public" -t "./templates/page.html"

# This is for the GitLab Pages publication
mkdir .public
cp -r public .public
mv .public public  

Metadata

Release files for marquedown 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marquedown 0.12.0
File Size Uploaded
marquedown-0.12.0.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for marquedown 0.12.0
File Interpreter ABI Platform
marquedown-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / marquedown-0.12.0.tar.gz

Download URL marquedown-0.12.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3924fc964950643979128e87f8c14dac8eee789c003c92e684c3f922ae74fd4b
BLAKE2b-256 checksum
How to use checksums
b254ce40a4bcf2af51ec919226a024da04342f11509ed770d14acbf8cddc8c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / marquedown-0.12.0-py3-none-any.whl

Download URL marquedown-0.12.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e5607a8c1097ba089feae9da652ab8515d15d2db96c3af52ecc5aef934f3b50
BLAKE2b-256 checksum
How to use checksums
710b057dcf63460718aa2b26f3af13214a102bfbc5a0319192782bb6912bb44e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.11.2

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page