Plugins
In addition to providing a theme for Pelican or Doxygen that styles the overall page layout and basic typography, m.css also contains a collection of plugins, extending the capabilities further.
Usage
For use with Pelican, each plugin is a standalone *.py
file that is meant
to be downloaded and put into a m/
subdirectory into one of your
PLUGIN_PATHS
. Then you add given m.something
package to your
PLUGINS
in pelicanconf.py
and restart Pelican. Download the plugins
below or grab the whole Git repository:
- m.htmlsanity
- m.components
- m.images
- m.math (needs also latex2svg), m.code (needs also ansilexer)
- m.plots, m.dot, m.qr
- m.link, m.gh, m.dox, m.gl, m.vk, m.abbr, m.filesize
- m.alias pelican only
- m.metadata pelican only
- m.sphinx
For the Python doc theme it’s enough
to simply list them in PLUGINS
. For the Doxygen theme,
all plugins that make sense in its context are implicitly exposed to it,
without needing to explicitly enable them.
Note that particular plugins can have additional dependencies, see documentation of each of them to see more. Click on the headings below to get to know more.
HTML sanity »
The m.htmlsanity
plugin is essential for m.css. It makes your markup
valid HTML5, offers a few opt-in typographical improvements and enables you to
make full use of features provided by other plugins.
Components »
All CSS components are exposed by the
m.components
plugin, so you can use them via reST
directives without needing to touch HTML and CSS directly.
Images »
Image-related CSS components are implemented by the m.images
plugin,
overriding builtin reST functionality and providing
a convenient automatic way to arrange photos in an image grid.
Math and code »
The m.math
and m.code
plugins use external libraries for math
rendering and syntax highlighting, so they are provided as separate packages
that you can but don’t have to use. With these, math and code snippets can be
entered directly in your reST sources.
Plots and graphs »
With m.plots
, m.dot
and m.qr
you can render various graphs,
charts and QR codes directly from values in your reST
sources. The result is embedded as an inline SVG and can be styled using CSS
like everything else.
Links and other »
The m.link
, m.gh
, m.dox
, m.gl
, m.vk
, m.abbr
,
m.filesize
and m.alias
plugins make it easy for you to link to
GitHub projects, issues or PRs, to Doxygen documentation, query file sizes and
provide URL aliases to preserve link compatibility.
Metadata »
With the m.metadata
plugin it’s possible to assign additional description
and images to authors, categories and tags. The information can then appear on
article listing page, as a badge under the article or be added to social meta
tags.
Sphinx »
The m.sphinx
plugin brings Sphinx-compatible directives for documenting
modules, classes and other to the Python doc theme.