Skip to main content

Badges for Foliant.

Project description


Preprocessor for Foliant which helps to add badges to your documents. It uses to generate badges.


$ pip install foliantcontrib.badges


To enable the preprocessor, add badges to preprocessors section in the project config:

    - badges

The preprocessor has a number of options:

    - badges:
        server: ''
        as_object: true
        add_link: true
            jira_path: localhost:3000/jira
            package: foliant
        # badge look parameters
        style: flat-square
        logo: jira

server : Shields server URL, which hosts badges. default:

as_object : If true — preprocessor inserts svg badges with HTML <object> tag, instead of Markdown image tag. This is required for links and hints to work. default: true

add_link : If true preprocessor tries to determine the link which should be added to badge (for example, link to jira issue page for jira issue badge). Only works with as_object = true. default: true

Please note that right now only links for pypi and jira-issue badges are being added automatically. Please contribute or contact author for adding other services.

vars : Dictionary with variables which will be replaced in badge urls. See variables section.

Also you may add parameters specified on the website which alter the badge view like: label, logo, style etc.


Just add the badge tag and specify path to badge in the tag body:


All options from config may be overriden in tag parameters:

<badge style="social" as_object="false">jira/issue/https/</badge>


You can use variables in your badges to replace parts which repeat often. For example, if we need to add many badges to our Jira tracker, we may put the protocol and host parameters into a variable like this:

    - badges:
            jira: https/

To reference a variable in a badge path use syntax ${variable}:


Description of the issue goes here. But it's not the only one.


Description of the second issue.

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

foliantcontrib.badges-1.0.4.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

foliantcontrib.badges-1.0.4-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page