prismicio-community / eleventy-plugin-prismic

Eleventy plugin and shortcodes to fetch and present Prismic content
https://github.com/prismicio-community/eleventy-plugin-prismic/blob/master/DOCUMENTATION.md
MIT License
98 stars 5 forks source link

Unknow asHtml, seems to be replaced by asHTML #3

Closed MKlblangenois closed 3 years ago

MKlblangenois commented 3 years ago

Versions

Reproduction

{% asHtml content %}

What is actually happening?

unknown block tag: prismic_asHtml

Resolve purpose

When I launch a DEBUG output, shortcode seems to be asHTML instead of asHtml (and asHTML works fine in my code). I did not send PR's since I'm not sure if it is an oversight in the documentation or an error in the name of the asHTML function.

Thanks !

lihbr commented 3 years ago

Hey there! Nice catch I actually updated the kit yesterday and released a new version including breaking changes, that's why I released it as a minor instead of a patch.

For consistency, I changed the case of the asHtml shortcodes to asHTML, I forgot to update the documentation and migration guide about it, everything should be alright now!

Also injected shortcodes are no longer prefixed by default, you can still provide a namespace using the shortcodesNamespace, setting it to "prismic" will allow for shortcodes to be prefixed the same way they where with version 0.0.x.

More information here: https://github.com/prismicio-community/eleventy-plugin-prismic/blob/master/DOCUMENTATION.md#migrating-from-00x

Finally, you seem like an Eleventy enthusiast! Really happy to hear if you have any feedback on the kit! I should be working soon on supporting Prismic previews :)

MKlblangenois commented 3 years ago

Hi @lihbr! Sorry for the late reply, I am having so much fun with Eleventy that I don't see the time passed! 😅

So far we have been working with NextJS to generate a static site, but NextJS is generating a little too much unnecessary JS, Eleventy does the job perfectly on this side!

eleven-plugin-prismic saved us so much time just with shortcodes, it's so useful.

Indeed, for the preview, we had tried to work with a system similar to NextJS with Eleventy Serveless, but we prefer to focus on optimizing our Eleventy + Prismic bundle for the moment. But indeed, the preview via Eleventy would be a really interesting feature that we can't wait to have !

We will continue to work on Eleventy with Primisc, so I do not hesitate to raise any issues or PR's in order to improve as much as possible this plugin.