11ty Plugin
eleventy-components
HTML, CSS and a sprincle of JavaScript get's ideas a long way. The days are gone were hacks and botches need to be applied to make things going in all the different browsers. Nowadays you write a few tags, add a bit of CSS and you can be sure that things are going to look very similar in all major browsers.
So, how nice would it be to create a library of simple components? That's what's fractal is for. And how about reusing those components wherever you like? A Small site with eleventy? A heavy-duty site with django? An online shop with shopware?
Sadly the component engine of fractal is a wild beast and deeply embedded in the fractal source. The eleventy-components pluginplugin is a small, lightweight version: Use simple fractal components in eleventy without reimplementing everything.
Installing and using the plugin
Well, you essentially install it into your sites 11ty project by using npm or by downloading the components.js file. Then you import that file in the sites .eleventy.js
, may do some config settings and register the tag. After that you can use the tag in your content files.
A more detailed description is in the readme.md of the github project.
How does the fractal components plugin work?
TODO Write this part
Let's implement this for every CMS
Since there is now a simple examle for that engine, let's implement it in more places like django, WordPress, Jumla, Drupal. Write your components once and use them everywhere.