Skip to main content

A MkDocs plugin to add a markdown filter to jinja templates.

Project description

mkdocs-markupsafe-markdown-filter

This plugin adds pallets' MarkupSafe template filter to mkdocs.

Setup

Install the plugin using pip:

pip install mkdocs-markupsafe-markdown-filter

Activate the plugin in mkdocs.yml:

plugins:
  - search
  - markupsafe-markdown-filter

Note: If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. This is because MkDocs enables the search plugin by default if there is no plugins entry set. When you add a external plugin like markupsafe-markdown-filter you have to enable the search plugin explicitly.

More information about plugins in the MkDocs documentation.

Usage

Enabling this plugin will filter jinja template code through a markdown filter:

{% set code_content %}
```php linenums="1"
<?php
foo = 1;
bar = 3;
if (foo == bar ) {
  // do something 
}
?>
```
{% endset %}
{{ code_content|markdown }}

See Also

More information about templates here.

More information about blocks here.

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

mkdocs_markupsafe_markdown_filter-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file mkdocs_markupsafe_markdown_filter-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mkdocs_markupsafe_markdown_filter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d490d59d9f30723901c883fbd407455dd8944862c33793716c9ea0110405bf2e
MD5 f8b875fa66eb7ffe3f732e8a4421daed
BLAKE2b-256 60e28b22a6d3dfa28746040b9c31fbbcea5ebd2b5543dc18bc81c91a6ecb7cc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markupsafe_markdown_filter-0.1.1.tar.gz:

Publisher: publish.yml on ntno/mkdocs-markupsafe-markdown-filter

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

File details

Details for the file mkdocs_markupsafe_markdown_filter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_markupsafe_markdown_filter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2dfc59754309c91297bd8c32858edfb27f868ed8b8fcfd3c086f2de68389d46
MD5 20db2d3811c72f17c465c90cb21fa0bf
BLAKE2b-256 ee5042aef4e1c90a0f605c5fbb876ca3c575ea8f1a9727d9fcc3d1c3b28291f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markupsafe_markdown_filter-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ntno/mkdocs-markupsafe-markdown-filter

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