TransWikia.com

How can I add custom CSS to the result of the markdown command?

Unix & Linux Asked by hba on September 1, 2020

New to markdown…

I have a very simple markdown file, I am using the markdown command

markdown something.md -o something.html

Is it possible for me to inject my own css into the something.html file


I tried to insert the css as raw html in the markdown and then use raw-html flag when processing the markdown, I am probably doing something wrong because markdown is treating the html as text..

here is the start of something.md

<html>
 <head>
  <style>
    <link res="stylesheet" type="text/css" href="mystyle.css">
  </style>
</head>
# Testing md
## testing md2
</html>

and here is the result of executing markdown -o something.html -f +html something.md is:

<p><html>
<head></p>
<p></head></p>
<h1>Testing md</h1>
<h2>testing md2</h2>
</html></p>

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP