Jekyll would not do elements? Liar!
I like the pushback from Katie Kodes right here. I’ve mentioned prior to now that I don’t suppose server-side languages haven’t fairly nailed “constructing in elements” in addition to JavaScript has, however hey, this can be a good level:
1. Any fundamental fragment-of-HTML “element” you’ll be able to outline with JSX in a file after which cross-reference as
<MyComponent key="worth" />
, you’ll be able to simply as simply outline with Liquid in a file and cross-reference in Jekyll as{% embrace MyComponent.html key=worth %}
.2. Any fundamental fragment-of-HTML “structure” you’ll be able to outline with JSX in a file after which cross-reference as
<MyLayout>Hey, world</MyLayout>
, you’ll be able to simply as simply outline with Liquid in a file after which cross-reference within the entrance matter of a Jekyll template asstructure: MyLayout
.
Any HTML preprocessor that can do partials with local variables is fairly near replicating one of the best of stateless JavaScript elements. The road will get even blurrier with stuff like Eleventy Serverless that may construct particular person pages on the fly by hitting the URL of a cloud operate.
Direct Link to Article — Permalink
The publish Jekyll doesn’t do components? Liar! appeared first on CSS-Tricks. You possibly can assist CSS-Tips by being an MVP Supporter.
Checkout extra Articles on Sayed.CYou
Comments
Post a Comment