cleverage / garden-starter-kit

La base de projet utilisé pour le développement static front-end chez Clever Garden
MIT License
20 stars 15 forks source link

Provide a way to inline critical CSS and JS #44

Open nhoizey opened 8 years ago

nhoizey commented 8 years ago

It is nowadays a best practice to inline some short CSS and JS for better webperf.

It would be nice to have an easy way to mark in a twig template where an external JS or CSS has to be inlined after compilation (if Sass or ES2015) and minification.

For example, the Jekyll Assets plugin for Jekyll let me do this: https://github.com/nhoizey/nicolas-hoizey.com/blob/master/_includes/head.html#L8-L15

stephane-tessier commented 8 years ago

Si j'ai bien compris tu veux qu'on puisse inclure dans le html via un helper twig le contenu d'un asset du dossier build ?

ryuran commented 8 years ago

It's look like that. Same concept than svgstore indeed.