Skip to content

A markdown extension to support Bootstrap 3 rows and columns.

License

Notifications You must be signed in to change notification settings

CTPUG/mdx_attr_cols

Repository files navigation

mdx_attr_cols

GitHub Actions CI status

A Markdown extension to add support for Bootstrap 3 rows and columns.

Licensed under the ISC License.

Requirements

The mdx_attr_cols plugin requires the following additional Markdown plugins:

Installation

Install with pip install mdx_attr_cols.

Documentation

Allows creating bootstrap container rows and columns using section attributes as provided by the attr_list and mdx_outline extensions.

Markdown example:

Header 1 {: cols=6 }
====================

Some paragraphs go here.

Header 2 {: cols=2 }
====================

More paragraphs go here.

Header 3 {: cols=4 }
====================

Final column.

Header 4
========

This is not in a row or column.

Python usage:

md = markdown.Markdown(
    extensions=[
        'mdx_outline',
        'attr_list',
        'attr_cols',
    ],
    extension_configs={
        'attr_cols': {
            'columns': 12,
            'attr': 'cols',
            'tags': ['section'],
        }
    })

Configuration options:

  • columns: Number of columns in a row. Default is 12.
  • tags: List of HTML tags to look for attributes on. Default is ['sections'].
  • attr: Name of column width attribute. Default is 'cols'.

About

A markdown extension to support Bootstrap 3 rows and columns.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages