gma / nesta

File Based CMS and Static Site Generator
http://nestacms.com
MIT License
902 stars 120 forks source link

Question: ERB support #196

Closed olimart closed 1 year ago

olimart commented 1 year ago

Hello and thanks for sharing Nesta. Just wondering what it would take to support ERB templates?

Thanks.

gma commented 1 year ago

Hi. They're supported — have you seen these docs?

https://nestacms.com/docs/design/templating-engines

I'm planning on making ERB the default before long, just because more people will be familiar, and the whole file-based CMS thing has kind of blown up since I made Haml the default!

Let me know if you've got more questions...

gma commented 1 year ago

Also, check the version 0.14.0 release blog post if you'd like to use it as a static site generator. I've not had time to write the full docs for that yet (SSG is a new feature), but the bits you need are all mentioned in that post.

olimart commented 1 year ago

Great.

I read https://nestacms.com/docs/creating-content/

Enter some text (formatted as Markdown, Textile or Haml).

Thank you.

gma commented 1 year ago

Enter some text (formatted as Markdown, Textile or Haml).

Ah yes, the docs talk about "templates" and "content" separately, which perhaps isn't that obvious when you're just getting setup for the first time. And that mention of Haml is a bit misleading too. It's accurate though; you can't create an ERB page inside ./content/pages, ERB is currently only supported for templates in ./views.