Closed luntik2012 closed 5 months ago
Sorry, md2c is not our thing.
This project only provides Markdown parser lib (libmd4c.so
), Markdown-to-HTML lib (libmd4c-html.so
) and simple line wrapper tool md2html
. So you're quite possibly on the wrong place unless someone wrote md2c atop MD4C without our knowledge (but even then you should likely start with that person/team.)
Sorry, it was a typo (md4c + md2html -> md2c, but should be md2html)
Yes, md2html
should likely add that into the output. It' sort of legacy of being primarily written as a test tool for MD4C lib and sort of only created as a tool of its own as afterthought.
As a workaround, you may use it without --full-html
and create the complete HTML head/footer on your own. The --full-html
will ever be likely useful only to users with very basic needs.
Thanks, this works fine for me
echo '<meta charset="UTF-8">' > example.html && md2html example.md >> example.html
It may more-or-less work (with some browsers) but strictly speaking you generate invalid HTML that way.
md2html
without the flag --full-html
generates only that contents stuff between <body>
and </body>
so you should prepend the whole head
<html>
<head>
..... <!-- custom stuff whatever your needs here are, including all the <meta charset="UTF-8"> -->
</head>
<body>
and respective footer
</body>
</html>
Hi, I'm a complete noob in html and web, I'm trying to serve single page generated by md2html using nginx.
The problem is that my file is utf8-encoded and browsers show garbage instead of expected symbols. I've resolved this problem by adding
<meta charset="UTF-8">
to the beginning of the md2html output.Is it possible to add this tag automatically using md2html? Am I doing something wrong?
My nginx config: