Plugins

In ad­di­tion to provid­ing a theme for Pel­ic­an or Doxy­gen that styles the over­all page lay­out and ba­sic ty­po­graphy, m.css also con­tains a col­lec­tion of plu­gins, ex­tend­ing the cap­ab­il­it­ies fur­ther.

Us­age

For use with Pel­ic­an, each plu­gin is a stan­dalone *.py file that is meant to be down­loaded and put in­to a m/ sub­dir­ect­ory in­to one of your PLUGIN_PATHS. Then you add giv­en m.something pack­age to your PLUGINS in pelicanconf.py and re­start Pel­ic­an. Down­load the plu­gins be­low or grab the whole Git re­pos­it­ory:

For the Py­thon doc theme it’s enough to simply list them in PLUGINS. For the Doxy­gen theme, all plu­gins that make sense in its con­text are im­pli­citly ex­posed to it, without need­ing to ex­pli­citly en­able them.

Note that par­tic­u­lar plu­gins can have ad­di­tion­al de­pend­en­cies, see doc­u­ment­a­tion of each of them to see more. Click on the head­ings be­low to get to know more.

HTML san­ity »

The m.htmlsanity plu­gin is es­sen­tial for m.css. It makes your markup val­id HTM­L5, of­fers a few opt-in ty­po­graph­ic­al im­prove­ments and en­ables you to make full use of fea­tures provided by oth­er plu­gins.

Com­pon­ents »

All CSS com­pon­ents are ex­posed by the m.components plu­gin, so you can use them via reST dir­ect­ives without need­ing to touch HTML and CSS dir­ectly.

Im­ages »

Im­age-re­lated CSS com­pon­ents are im­ple­men­ted by the m.images plu­gin, over­rid­ing built­in reST func­tion­al­ity and provid­ing a con­veni­ent auto­mat­ic way to ar­range pho­tos in an im­age grid.

Math and code »

The m.math and m.code plu­gins use ex­tern­al lib­rar­ies for math ren­der­ing and syn­tax high­light­ing, so they are provided as sep­ar­ate pack­ages that you can but don’t have to use. With these, math and code snip­pets can be entered dir­ectly in your reST sources.

Plots and graphs »

With m.plots, m.dot and m.qr you can render vari­ous graphs, charts and QR codes dir­ectly from val­ues in your reST sources. The res­ult is em­bed­ded as an in­line SVG and can be styled us­ing CSS like everything else.

Links and oth­er »

The m.link, m.gh, m.dox, m.gl, m.vk, m.abbr, m.filesize and m.alias plu­gins make it easy for you to link to Git­Hub pro­jects, is­sues or PRs, to Doxy­gen doc­u­ment­a­tion, query file sizes and provide URL ali­ases to pre­serve link com­pat­ib­il­ity.

Metadata »

With the m.metadata plu­gin it’s pos­sible to as­sign ad­di­tion­al de­scrip­tion and im­ages to au­thors, cat­egor­ies and tags. The in­form­a­tion can then ap­pear on art­icle list­ing page, as a badge un­der the art­icle or be ad­ded to so­cial meta tags.

Sphinx »

The m.sphinx plu­gin brings Sphinx-com­pat­ible dir­ect­ives for doc­u­ment­ing mod­ules, classes and oth­er to the Py­thon doc theme.