Skip to main content

Markdown-Include

This is an extension to Python-Markdown which provides an “include” function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator.

Installation

This module can now be installed using pip.

pip install markdown-include

Usage

This module can be used in a program in the following way:

import markdown
html = markdown.markdown(source, extensions=[markdown_include.include'])

The syntax for use within your Markdown files is {!filename!}. This statement will be replaced by the contents of filename. Markdown-Include will work recursively, so any included files within filename wil also be included. This replacement is done prior to any other Markdown processing, so any Markdown syntax that you want can be used within your included files. Note that this is a change from the previous version. It was felt that this syntax was less likely to conflict with any code fragments present in the Markdown.

By default, all file-names are evaluated relative to the location from which Markdown is being called. If you would like to change the directory relative to which paths are evaluated, then this can be done by specifying the extension setting base_path.

import markdown
from markdown_include.include import MarkdownInclude

# Markdown Extensions
markdown_include = MarkdownInclude(
    configs={'base_path':'/srv/content/', 'encoding': 'iso-8859-1'}
)
html = markdown.markdown(source, extensions=[markdown_include])

Metadata

Release files for tiangolo-markdown-include 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiangolo-markdown-include 0.7.0
File Size Uploaded Provenance Actions
tiangolo-markdown-include-0.7.0.tar.gz 4.8 kB Without provenance Details for tiangolo-markdown-include-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiangolo-markdown-include 0.7.0
File Interpreter ABI Platform Actions
tiangolo_markdown_include-0.7.0-py3-none-any.whl Python 3 none any Details for tiangolo_markdown_include-0.7.0-py3-none-any.whl

Total release size: 22.3 kB

Release files / tiangolo-markdown-include-0.7.0.tar.gz

Download URL tiangolo-markdown-include-0.7.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
db41146a27debd028cf38b79ef46d39b6ef0e00abd9d49cf4e217c81025a522b
BLAKE2b-256 checksum
How to use checksums
efd041c202180dfbf3ed481f1098a54c54d2e92c3f6460b37f5c47ad5fd492e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.0 pkginfo/1.7.0 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

Release files / tiangolo_markdown_include-0.7.0-py3-none-any.whl

Download URL tiangolo_markdown_include-0.7.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9471ff0f72fc331db20a3d1410e6a6b80706ca0d95acb5562dbd82e5d6bb9a83
BLAKE2b-256 checksum
How to use checksums
df3b43890074c0deb1e8d3ac646bcb7b5901d6aca5173a26954fb9a426fe9df0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.0 pkginfo/1.7.0 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

Security for tiangolo-markdown-include 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page