Kitware / kw-doc

Static website generator based on Hexo to build developer documentation
2 stars 3 forks source link

Markdown processing option for newlines? #4

Closed vibraphone closed 6 years ago

vibraphone commented 6 years ago

Is there a way to set options for the markdown processor that kw-doc uses? I would like at least some of the markdown pages to respect the usual convention that linebreaks in the input do not create linebreaks in the output (but an empty line in the input will start a new paragraph).

I see that some pages that use kw-doc include some options at the top of the markdown (followed by a line with only --- to separate them from the start of the markdown). Is there any documentation for what options kw-doc accepts?

jourdain commented 6 years ago

The top is for variables that are used in the template.

The option could be described in hexo. But not sure you have that amount of freedom.

vibraphone commented 6 years ago

To answer my own question, this is hexojs/hexo#333 although from the discussion, it was not clear what the exact option names should be. Some experimentation yielded this:

---
markdown:
  gfm: false
---

which you should put at the top of your markdown file. I could not figure out how to pass the site-wide configuration to hexo.