/mdx_staticfiles

A Markdown extension to add support for django.contrib.staticfiles.

Primary LanguagePythonISC LicenseISC

mdx_staticfiles

GitHub CI status

A Markdown extension to add support for django.contrib.staticfiles.

Licensed under the ISC License.

Requirements

The mdx_staticfiles plugin requires only the base markdown library.

Installation

Install with pip install mdx_staticfiles.

Documentation

Allows inserting {% static %} Django tags into Markdown, that will reference files managed by django.contrib.staticfiles.

The following Markdown example:

A [promotial video]({% static "video/promo.mkv" %}).

Might result in:

A <a href="https://cdn.example.net/static/video/promo.mkv">promotional
video</a>.

Python usage:

md = markdown.Markdown(
    extensions=[
        'staticfiles',
    ],
)