Read Pelican metadata from link references
Project description
Pelican Markdown Unrendered Metadata
Read Pelican metadata from link references.
Usage
Write metadata in the form [//Pelican/KEY]: # (VALUE).
They can be placed anywhere in the document.
If the first text content is a top-level heading,
the heading is removed from the document, and used as the title.
For example,
# Hello, world!
[//Pelican/date]: # (2000-10-31 00:00)
[//Pelican/author]: # (Noname)
Goodbye, world!
The equivalent MultiMarkdown document used by Pelican would be
title: Hello, world!
date: 2000-10-31 00:00
author: Noname
Goodbye, world!
If a key has multiple sources (references, MultiMarkdown, heading), the order of stored value is unspecified.
Installation
If PLUGINS is not specified inside pelicanconf.py,
then installing this package should be sufficient setup.
python -m pip install pelican-markdown-unrendered-metadata
Otherwise, inside pelicanconf.py,
add markdown_unrendered_metadata to the PLUGINS list variable.
Raison d'être
Pelican metadata of Markdown documents are colon-separated key-value pairs at the beginning of the document. Markdown parsers see them as a block of text and generate an unintended paragraph when rendered.
To mitigate this, the metadata can be embedded inside a form of Markdown comments. This plugin uses link references as comments, suggested by a StackOverflow answer:
[//]: # (This may be the most platform independent comment)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pelican-markdown-unrendered-metadata-0.1.1.tar.gz.
File metadata
- Download URL: pelican-markdown-unrendered-metadata-0.1.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.7.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab447fc36e888e62a237d052354e18154128bd18b90fe2eff393ec0d8f348920
|
|
| MD5 |
e56a8a4db2fe15d140be1157fedb44de
|
|
| BLAKE2b-256 |
4a84686f53ac57209b206be34118ad20af54543e81d34c6e087a92dec51584d0
|
File details
Details for the file pelican_markdown_unrendered_metadata-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pelican_markdown_unrendered_metadata-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.7.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad08d2787bf5876ffab66b54015e2a8d8824693592ef9c5c2642d36d1c5bf6a4
|
|
| MD5 |
0b105c79516f36aa1c94836745f2ccdb
|
|
| BLAKE2b-256 |
44641fe0c196bee03219020d1472de0fdc8c0f653a5f14cafb8b86ab9f8c3674
|