TryGhost / eleventy-starter-ghost

A starter template to build websites with Ghost & Eleventy
https://eleventy.ghost.org
MIT License
351 stars 165 forks source link

Is there no way to use this with Ghost's .hbs files? #5

Closed LDubya closed 5 years ago

LDubya commented 5 years ago

Issue Summary

Your demo uses .njk files.

When we add a Ghost theme to the src folder and edit .eleventy.js the config to include hbs files and run it, a lot of errors come up about being unable to find standard ghost helpers such as "get" and "foreach".

For example:

$ yarn start

yarn run v1.17.3
$ yarn run dev
$ cross-env ELEVENTY_ENV=dev eleventy --serve
Problem writing Eleventy templates: (more in DEBUG output)
> Having trouble rendering hbs template ./src/error.hbs (TemplateContentRenderError)
> Missing helper: "get" (Error):

Does this not support Ghost's .hbs files? How do we get it working with Ghost hbs files? We have no use for netfly nor njk files. Just want to build a static ghost blog, as promised.

daviddarnes commented 5 years ago

Hi @LDubya! Ghost Handlebars themes are designed purely for the theming front-end within Ghost itself. This Eleventy starter is for when you want to use an external front-end stack outside of Ghost, more info can be found here https://ghost.org/docs/api/v2/eleventy/

Ghost themes are not meant to be used within Eleventy, however you can use .hbs files in Eleventy.

Hope this clears things up!