yeojz / metalsmith-react-templates

A metalsmith plugin to render files using React / Preact / JSX based templates.
MIT License
92 stars 17 forks source link

Access Site Metadata #55

Closed benpolinsky closed 7 years ago

benpolinsky commented 7 years ago

Any way to access site metadata in jsx?

benpolinsky commented 7 years ago

So I found it in props.metadata.

This may be outside of your scope, but what are you thoughts about displaying the metadata in the site's header? So, for instance, displaying the title of the site in the title tag.

benpolinsky commented 7 years ago

Okay, just rendering the head as a react component, wasn't sure if that was possible.

Thanks for your work on this plugin!

yeojz commented 7 years ago

Another way is to use something like react-helmet.

benpolinsky commented 7 years ago

Oh yeah, I forgot about that one. Love the name, too, coming from the devs at NFL