Skip to content

Latest commit

 

History

History
61 lines (36 loc) · 1.28 KB

README.rst

File metadata and controls

61 lines (36 loc) · 1.28 KB

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',
    ],
)