I apologize if a simple way to this programmatically (not by copying/pasting in a browser field and clicking a button to convert) is documented somewhere. In my searches and reading I cannot find it.
I would like to programmatically turn a Markdown and CSS file into what sounds like may be called "inline" CSS.For example:
This Markdown file (file.md)
# Install
Install instructions
## Update
Update instructions
This CSS file (style.css)
h1 {
font-size: 100px;
}
h2 {
color: red;
}
Becomes this (file.html)
Install
Install instructions
Update
Update instructions
I am transforming the Markdown to HTML with Pandoc
pandoc -f markdown -t html file.md -o file.html
When I use
pandoc -f markdown -t html file.md -o file.html --css=style.css --self-contained
(or --standalone)
It returns
filecode{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
Install
Install instructions
Update
Update instructions
As mentioned above this is not my goal. I would like the CSS to be strictly "inline":
Install
Is anyone aware of a tool or script already written than can programmatically achieve this? I have searched and come up empty. Ideally I could use Pandoc for this, but I cannot discover a way.
I do not care if the
and