cntrump / hugo-notepadium

a fast gohugo theme, 100% JavaScript-free.
https://examplesite.lvv.me/
MIT License
332 stars 125 forks source link

Process custom CSS as templates #85

Closed reitzig closed 4 years ago

reitzig commented 4 years ago

This allows us to refer to site (and page) config in CSS.

Not sure what the first parameter of resources.ExecuteAsTemplate is for; doesn't seem to appear in the output. Maybe a temporary filename?

Example

span.myfoo {
    text-color: "{{ site.Params.FooColor }}";
}