Skip to main content

YAML metadata extension for Python-Markdown

Project description

YAML metadata extension for Python-Markdown

Build Status Coverage Status Code style: black 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?
  - Lorem Ipsum
  - Stupid content

Lorem Ipsum is simply dummy text.

md = markdown.Markdown(extensions = ['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']}

Development and contribution

  • install project dependencies
python develop
  • install linting, formatting and testing tools
pip install -r requirements.txt
  • run tests
  • run linters
black --check ./
  • feel free to contribute!

Python versions compatibility

This plugin tested with python versions 3.6 and 3.7.

Project details

Download files

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

Files for markdown-full-yaml-metadata, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size markdown-full-yaml-metadata-2.0.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page