cwjohan / markdown-to-html

Command-line utility to convert Github Flavored Markdown to HTML.
MIT License
236 stars 86 forks source link

Indicating html template #12

Closed matteonovelli-zz closed 7 years ago

matteonovelli-zz commented 7 years ago

Hi and thanks for this converter! Good job!

I've made a small modification because I want to indicate the utf8 charset (because the spanish language) and a custom header an footer.

In order to do this I thought that's a good idea to indicate an html template instead of --title and --stylesheet

You decide if you want to pull my changes.

matteonovelli-zz commented 7 years ago

The template looks like this:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>My own title</title>
    <link rel="stylesheet" href="./mycss.css">
  </head>
  <body>
    <h3>My own header</h3>
    {markdown}
    <h3>My own footer</h3>
  </body>
</html>

The only requirement is the {markdown} outlet to indicate where markdown code will be placed

wejeus commented 7 years ago

Would like to have this as well. Default implementation create issue with localization (missing meta data / headers).

Also, the --stylesheet command does not work when generating from subdirectories via script (not possible to specify dynamic relative path)

matteonovelli-zz commented 7 years ago

@wejeus you can use this fork https://github.com/matteonovelli/markdown-to-html and indicate your own template.