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.0.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.0.tar.gz.

File metadata

File hashes

Hashes for mkdocs_markupsafe_markdown_filter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18e796f51f41dd40b7d6a7c406ecdf22f3311502cdcf26baa6275fb077e105ae
MD5 bec9694e7c4551d695f623aa17e282da
BLAKE2b-256 25a390cbd14154340b8d3159ec362009bf3c33031412219f4c8e34711095811a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markupsafe_markdown_filter-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_markupsafe_markdown_filter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4213d5be32a19e43d843b989a5f1aae86da9cd785618f463053f435b28250c5a
MD5 bae9ab249372c2970a95bc354c56a77c
BLAKE2b-256 a8ff3017ce4d858de6d9876bce05777bc8340339641075112045b74f0338a6cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markupsafe_markdown_filter-0.1.0-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