jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 332 forks source link

Use plain HTML content instead of Markdown? #323

Closed dagoss closed 7 years ago

dagoss commented 7 years ago

I was trying to make a very simple test page with Wintersmith using html content instead of markdown. It doesn't seem to render.

Example:

contents/
    index.html
layouts/
    base.jade

Reading the docs, it seemed to me like Wintersmith only supports writing content in markdown or json (but the json file can only specify metadata, like layout, so all the content would be in the layout?).

So what is the correct way to write content in something other than Markdown? The available plugins seem to focus on expanding languages available for layouts, but not content.

This might be a fundamental misunderstanding on my part, as I'm attempting to use Wintersmith similar to Jekyll, where you can write basically the body HTML for a content page, and then specify a layout fragment for it in the yaml metadata.

jnordberg commented 7 years ago

Hi, you can write HTML in a markdown file. Otherwise a plugin like https://github.com/smebberson/wintersmith-jade but with node-nunjucks or similar might be what you're looking for. I never understood why you'd want to do it that way, seems a bit backwards to me, but to each their own :)

dagoss commented 7 years ago

Thanks for the quick suggestion. I suppose just using HTML in a markdown file is the simplest way to do it, so I'll do that for now.

It would be nice if Wintersmith could use HTML content out-of-box though, instead of just markdown, treating it as, well, "already converted markdown"

Edit: After looking at a few examples on the showcase wiki page, I think how I was trying to use Wintersmith differs from how it was intended (specifically that templates in Wintersmith was analagous to _layouts in Jekyll--they're not). I'm going to close to request since the issue isn't really Wintersmith working incorrectly but rather me :)