Skip to main content

YAML metadata extension for Python-Markdown

Project description

Build Status Coverage Status Python versions PyPi

This extension adds YAML meta data handling to markdown with all YAML features.

As in the original, metadata is parsed but not used in processing.

Metadata parsed as is by PyYaml and without additional transformations, so this plugin is not compatible with original Meta-Data extension.

Basic Usage

import markdown


text = """---
title: What is Lorem Ipsum?
categories:
    - Lorem Ipsum
    - Stupid content
...

Lorem Ipsum is simply dummy text.
"""

md = markdown.Markdown(['full_yaml_metadata'])
md.convert(text) == '<p>Lorem Ipsum is simply dummy text.</p>'
md.Meta == {'title': 'What is Lorem Ipsum?', 'categories': ['Lorem Ipsum', 'Stupid content']}

Python versions compatibility

This plugin tested with python versions 3.4, 3.5 and 3.6.

For python 3.4 you must install typing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown-full-yaml-metadata-0.0.4.tar.gz (2.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page