skillfed

mkdocs-embed-external-markdown

Mkdocs plugin that allow to inject external markdown or markdown section from given url

mkdocs-embed-external-markdown v3.0.2 108.8K downloads/30d#12,539 on PyPI0
Permissive license MIT AGING released

What it is and what it does

This is a MkDocs plugin that extends your documentation build process to pull markdown content from external URLs and inject it directly into your pages. It works by parsing Jinja2 template syntax in your markdown files—you specify a URL and optionally a section header (like '## Installation'), and the plugin fetches that content and embeds it at build time. The plugin strips top-level headers from embedded content so you can use your own, and it supports extracting specific sections defined by markdown headers at any level.

The plugin depends on Jinja2 (for template rendering) and requests (for fetching URLs). It can authenticate with private GitHub repositories if you set the GH_TOKEN environment variable. A known gotcha: if your markdown contains Jinja2-like syntax (common in code examples documenting template languages, Ansible, or Django), you need to wrap those blocks in `{% raw %}` tags to prevent the plugin from trying to interpret them as macros.

Use it for:

  • Keep installation or configuration instructions in a central repository and embed them in multiple documentation sites without duplication.
  • Build a documentation hub that pulls README sections from different project repositories into a unified guide.
  • Embed changelog or API documentation from external sources into your MkDocs site without manual copying.
  • Document Ansible playbooks or Django templates by embedding code examples from live repositories while protecting them from Jinja2 interpretation.
  • Maintain single-source-of-truth documentation by referencing sections from GitHub private repositories using a personal access token.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A MkDocs plugin that fetches and embeds markdown content or specific sections from external URLs directly into your documentation pages using Jinja2 template syntax.

Yes, if you need to embed external markdown into MkDocs and can tolerate aging maintenance. The plugin is stable (no known vulnerabilities, low install friction, permissive license), but the 900-day gap since the last release means new MkDocs features or Python versions may not be supported. Install it for straightforward content embedding, but monitor the repository for compatibility issues with your MkDocs version.

Install

mkdocs-embed-external-markdown on PyPI

pip

pip install mkdocs-embed-external-markdown

uv

uv add mkdocs-embed-external-markdown

poetry

poetry add mkdocs-embed-external-markdown

Installing mkdocs-embed-external-markdown

Before you install

Low install friction with only two runtime dependencies (Jinja2 and requests). Maintenance status is aging—last release was 900 days ago, though the repository remains active with a recent commit on 2025-02-24. The package supports current Python versions (3.9+).

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.

Quickstart

pip install mkdocs-embed-external-markdown

# In mkdocs.yml:
plugins:
  - external-markdown

# In your markdown:
{{ external_markdown('https://raw.githubusercontent.com/user/repo/main/README.md', '## Section Name') }}

Requires Python 3.9 or later. If fetching from private GitHub repositories, the GH_TOKEN environment variable must be set with a valid personal access token.

Verify before relying

  • Whether the plugin handles rate limiting or caching of fetched external content
  • Performance characteristics when embedding many sections or large markdown files
  • Compatibility with recent MkDocs versions beyond what the aging maintenance status suggests

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — Jinja2, requests
Maintenance aging — 900 days since the last release
Last repo commit
First released
Downloads 108,786/month — #12,539 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mkdocs_embed_external_markdown-3.0.2-py3-none-any.whl

Keywords: mkdocs, plugin, markdown, external-markdown, embed, external, markdown-section

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.9

Tags

mkdocs embed external markdowninclude remote markdown sectionsfetch markdown from urlmkdocs plugin external contentmarkdown content injectioncross-document markdown embeddingmkdocs external markdown plugin
mkdocs-plugincontent-reusedocumentation-automation

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mkdocs-macros-plugin

Extends MkDocs with Jinja2 templating to use…

permissive · top 5,000 on PyPI

mkdocs-video

A MkDocs plugin that embeds videos in…

permissive · top 15,000 on PyPI

mkdocs-markdownextradata-plugin

Injects mkdocs.yml extra variables into…

permissive · top 15,000 on PyPI

mkdocs-table-reader-plugin

A MkDocs plugin that inserts tables from…

permissive · top 15,000 on PyPI

mkdocs-plugin-inline-svg

A MkDocs plugin that replaces SVG image…

permissive · top 15,000 on PyPI

mkdocs-include-markdown-plugin

A MkDocs plugin that includes content from…

permissive · top 15,000 on PyPI

mkdocs-autorefs

A MkDocs plugin that automatically creates…

permissive · top 5,000 on PyPI

mkdocs-mermaid2-plugin

A MkDocs plugin that renders Mermaid diagram…

permissive · top 5,000 on PyPI

mkdocs-meta-manager

A MkDocs plugin that automatically applies meta…

permissive · top 5,000 on PyPI

wikitextparser

Parses and manipulates MediaWiki wikitext…

copyleft · top 15,000 on PyPI