image - Jekyll accessing page variables from CSS -


i'm trying set background-img in css.liquid file, , need yaml variables in page. how can that? have far:

background-image: url({{ page.locales[page.default_locale][page.first_name] }}); 

i had this:

background-image: url('{{ page.first_name }}{{ page.last_name }}.jpg'); 

only files yaml front matter section, , extensions .html, .markdown, .md, or .textile processed jekyll.

you hack working saving css file 1 of extensions, , including yaml front matter section. seems pretty clumsy way it, , it'll make ugly code, might work.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -