-
Notifications
You must be signed in to change notification settings - Fork 97
Description
Suggested by /u/AndydeCleyre on Reddit, besides that I bet I'm far from being the only one who sometimes needs to render a quick'n'dirty reST page into HTML and put it somewhere:
- quickly plot benchmark results
- render a math equation
- explain some code, include links to docs etc
- dot graph
- a README with fancier rendering than what GitHub/GitLab provides etc.
and right now, there's no easy way to achieve this with m.css -- one has to either install Pelican and set up the whole site, or abuse the Python doc generator (which doesn't need Pelican on its own, but still requires you to have a config file). Ideally it would be as simple as
rst2mcss.py in.rst out.htmlpicking up a header/footer-less full-page template, bundling the CSS inside that page and producing a self-contained page. Goal of this is providing just a single-page rendering, for multiple pages, crosslinking, tagging, categories, ... please just use Pelican or the Python doc generator. Further possibilities:
- ability to switch to a different color theme via a preset (
--theme dark,--theme light, or specifying a path to a (self-contained) CSS--theme my-theme.css) - ability to switch to a different layout template via a preset or by supplying the HTML directly (ideas: plain page, TOC on a side, heeader/footer "branding"...)
- ability to opt-out of CSS embedding (
--external-css?) - because some plugins need additional config, have an ability to supply a config file
- or pick it up implicitly, look for
rst2mcss.conf.pynext toin.rst? - an ability to supply config options on command-line?
-c "M_HTMLSANITY_HYPHENATION=True;M_HTMLSANITY_SMART_QUOTES=True"? - or config presets, enabling a particular set of plugins (
-c minimal,-c full, ...)?
- or pick it up implicitly, look for
Metadata
Metadata
Assignees
Labels
Projects
Status