Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments, ideas on v2.0 #154

Closed
khawkins98 opened this issue Feb 10, 2018 · 2 comments
Closed

Comments, ideas on v2.0 #154

khawkins98 opened this issue Feb 10, 2018 · 2 comments

Comments

@khawkins98
Copy link

khawkins98 commented Feb 10, 2018

I've used Panini for my personal site+blog and moved it to the 2.0 alpha, and I thought I'd pass along some sentiment/remarks:

  • 👍 Having access to {{pages}} is incredibly useful and eliminates the need to faff about with .YML files for index pages.
  • 🤕 Working with {{pages}} is a bit confusing. Inside my each loop I have to access {{this.[2]}} to get to the metadata. Would be nice if these were named, a la {{this.body}} {{this.metadata}}.
    • And/or a {{allPagesBody}} {{allPagesMetadata}}. This would be nice as sorting nested arrays in handlebars is tricky. I've still yet to work out how to sort {{pages}} by individual page metadata.
  • 🤕 In v1.x I was able to pass non .html files to Panini. 2.0 seems to just ignore other types, such as .xml. So it's trickier to make things like RSS feeds.
  • 👍 I'm not sure if https://github.com/helpers/handlebars-helpers is new in v2.0, but it's really nice to have. Not sure if that's specifically mentioned that you can use these. Being able to use {{moment}} for dates is a real win.

In general, really happy to see the new features/things in 2.0!

Here's a blog I wrote -- it's much of the same as above, but with a bit more detail, links: https://work.allaboutken.com/posts/20180210-zurb-panini-2-migration.html

Feel free to just close this, but you said you were interested in feedback :-)

@gakimball
Copy link
Contributor

Thank you so much for this! :) It's really helpful.

Working with {{pages}} is a bit confusing.

Makes sense. This is an easy fix. #155

In v1.x I was able to pass non .html files to Panini. 2.0 seems to just ignore other types

The solution I planned to implement here was support for a static/ folder that just copies all of its contents to your build folder as-is. I've wanted to keep this library focused on the essentials of template rendering (so no Sass, JS, etc. support), but copying static files is pretty simple, so it's something I'll implement before v2 is done. #156

I'm not sure if https://github.com/helpers/handlebars-helpers is new in v2.0, but it's really nice to have.

It is new! I want Panini to be a batteries-included solution, so bundling a large helpers library is part of that.

@khawkins98
Copy link
Author

Cheers, thanks for taking the ideas onboard. Glad it was helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants