megazear7 / orison

A server and static site generator built on top of lit-html
http://orison.alexlockhart.me
18 stars 2 forks source link

Context Partial Methods #3

Closed megazear7 closed 5 years ago

megazear7 commented 5 years ago

Provide a context.partial method which renders JS or MD partials, with paths relative to /src/partials.

megazear7 commented 5 years ago

The problem with this is that then the partials would need access to the context object in order to be capable of rendering other partials. This would need provided through an orison export or through a partial parameter. I don't like either of these methods. Instead I like the approach of context.mdFile for rendering markdown partials and importing partials directly for rendering JS partials. This keeps orison out of the way, maintains consistency, and yet provides the ease of access for rendering markdown.