Skip to content

Latest commit

 

History

History
136 lines (108 loc) · 6.29 KB

File metadata and controls

136 lines (108 loc) · 6.29 KB

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.

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 :gh:`grab the whole Git repository <mosra/m.css>`:

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.

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.

All CSS components are exposed by the m.components plugin, so you can use them via :abbr:`reST <reStructuredText>` directives without needing to touch HTML and CSS directly.

Image-related CSS components are implemented by the m.images plugin, overriding builtin :abbr:`reST <reStructuredText>` functionality and providing a convenient automatic way to arrange photos in an image grid.

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 :abbr:`reST <reStructuredText>` sources.

With m.plots, m.dot and m.qr you can render various graphs, charts and QR codes directly from values in your :abbr:`reST <reStructuredText>` sources. The result is embedded as an inline SVG and can be styled using CSS like everything else.

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.

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.

The m.sphinx plugin brings Sphinx-compatible directives for documenting modules, classes and other to the Python doc theme.