Skip to main content

Reader plugin for Markdown-IT-py replacement

Project description

Markdown-IT reader: A Plugin for Pelican

Build Status PyPI Version License

Reader plugin for Markdown-IT-py replacement

This is double-opinionated, in that it's opinionated using Markdown-IT and again because we add in some additions; in particular:

  • Tables
  • footnotes
  • Pygment-based syntax highlighting

Installation

This plugin can be installed via:

python -m pip install pelican-markdown-it-reader

Usage

There are currently no configuration items.

Once installed it takes over responsibility for reading the following file extensions:

  • md
  • markdown
  • mkd
  • mdown

By taking over link_open and image render rules, the plugin handles replacing the pelican link placeholders with appropriate href items which are then rendered to html.

Metadata

The reader parses a YAML frontmatter header delimited by --- (terminated by a line of --- or ...), for example:

---
title: My Post
date: 2021-06-11 10:00
category: server admin
tags:
  - apple
  - macintosh
---

Body text...

List-form values (such as tags) are supported, and FORMATTED_FIELDS (e.g. summary) are rendered through Markdown-IT as well. Because the reader handles YAML frontmatter itself, you do not need the pelican-yaml-metadata plugin; in fact you should remove it, since whichever reader registers last wins the Markdown extensions and yaml-metadata renders bodies with python-markdown (which, among other things, cannot render fenced code blocks nested inside lists).

Files without a --- header fall back to a simple key: value metadata parser for backwards compatibility.

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

Updating

We use dependabot for updating dependencies, conventional commits for commit messages, and github actions for release.

To generate a release:

  1. cz bump --dry-run [--increment patch] to verify changes
  2. cz bump [--increment patch] to finalize
  3. git push to send code and git push <tag> to send the tag (or the less-safe --tags)

License

This project is licensed under the MIT license.

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

pelican_markdown_it_reader-3.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pelican_markdown_it_reader-3.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pelican_markdown_it_reader-3.0.0.tar.gz.

File metadata

File hashes

Hashes for pelican_markdown_it_reader-3.0.0.tar.gz
Algorithm Hash digest
SHA256 d7e35bf98d2bbe4207d1500e6ed58d2c54da7dc8d01e33d5c30218dd98a59f6e
MD5 241336addd37c4197ff91a99b607f98d
BLAKE2b-256 de800ac0c34ff701c77142c5c205c6088290c56ab569117dddea88db45a6b630

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_markdown_it_reader-3.0.0.tar.gz:

Publisher: main.yml on gaige/markdown-it-reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pelican_markdown_it_reader-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pelican_markdown_it_reader-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59301656dfc1d653ea3e4eab99a92d85abd50597adbc583ac80f7fc75c387cc0
MD5 4083ee661088129f404ba6560a37c497
BLAKE2b-256 5538054824e64ab21b5f60b07146ccb72d24bbda410eb762a4bf4bfff25d617c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_markdown_it_reader-3.0.0-py3-none-any.whl:

Publisher: main.yml on gaige/markdown-it-reader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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