Admonitions preprocessor for Foliant
Preprocessor which tries to make admonitions syntax available for most backends.
Admonitions are decorated fragments of text which indicate a warning, notice, tip, etc.
We use rST-style syntax for admonitions which is already supported by mkdocs backend with admonition extension turned on. This preprocessor makes this syntax work for pandoc and slate backends.
Installation
$ pip install foliantcontrib.admonitions
Config
Just add admonitions into your preprocessors list. Right now the preprocessor doesn't have any options:
preprocessors:
- admonitions
Usage
Add an admonition to your Markdown file:
!!! warning "optional admonition title"
Admonition text.
May be several paragraphs.
Currently supported backends:
pandocmkdocs*slate
* for admonitions to work in mkdocs, add admonition to the markdown_extensions section of your mkdocs.yml config:
backend_config:
mkdocs:
mkdocs.yml:
markdown_extensions:
- admonition
Notes for slate
Slate has its own admonitions syntax of three types: notice (blue notes), warning (red warnings) and success (green notes). If another type is supplied, slate draws a blue note but without the "i" icon.
Admonitions preprocessor transforms some of the general admonition types into slate's for convenience (so you could use error type to display same kind of note in both slate and mkdocs). These translations are indicated in the table below:
| original type | translates to |
|---|---|
| error | warning |
| danger | warning |
| caution | warning |
| info | notice |
| note | notice |
| tip | notice |
| hint | notice |
Metadata
Release files for foliantcontrib.admonitions 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foliantcontrib.admonitions-1.0.1.tar.gz | 4.2 kB | Without provenance | Details for foliantcontrib.admonitions-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foliantcontrib.admonitions-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for foliantcontrib.admonitions-1.0.1-py3-none-any.whl |
Total release size: 8.5 kB
Release files / foliantcontrib.admonitions-1.0.1.tar.gz
| Download URL | foliantcontrib.admonitions-1.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a7df139cd600b7b1556f2cc038e6c395b1c92d01cf7b02c63f92f950e58869a
|
|
BLAKE2b-256 checksum How to use checksums |
4fa24bdd18facff94fc5c5d109490d587cb27edde8b5835c357824fe4903cc36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / foliantcontrib.admonitions-1.0.1-py3-none-any.whl
| Download URL | foliantcontrib.admonitions-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90c52dc2376501bc79d8f2785e7cc97da224360d62ddd7b06c219fa0a5c98060
|
|
BLAKE2b-256 checksum How to use checksums |
a975d693e9ee050562fed3e41d6499d7eee1c408c2cf9c4ccf27173e44684ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for foliantcontrib.admonitions 1.0.1
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.