j***@devietti.net
2016-06-30 07:28:20 UTC
Hi there,
I like to use template variables in my CSS files for things like colors
that are referenced repeatedly. This was working great for me in a previous
version of Hakyll (I forget which, unfortunately), but upon upgrading to
4.8.3.2 this no longer works for me. Here's the rule I was using before:
match "css/*" $ do
route idRoute
compile $ do
getResourceBody
get this error:
Missing field $Blue$ in context for item css/my.css
For reference, my.css looks like this:
---
Blue: #01256e
---
a {
color: $Blue$;
text-decoration: underline;
background: transparent;
}
When I add the needed fields manually to a new context, everything works
again. Some built-in fields (like $url$ and $path$) are being expanded as
usual. I think the issue is that the embedded metadata fields are not
getting picked up by defaultContext, but I'm not sure how to fix it.
thanks!
joe
I like to use template variables in my CSS files for things like colors
that are referenced repeatedly. This was working great for me in a previous
version of Hakyll (I forget which, unfortunately), but upon upgrading to
4.8.3.2 this no longer works for me. Here's the rule I was using before:
match "css/*" $ do
route idRoute
compile $ do
getResourceBody
= applyAsTemplate defaultContext
I can compile my site without warnings, but when I run "./site rebuild" Iget this error:
Missing field $Blue$ in context for item css/my.css
For reference, my.css looks like this:
---
Blue: #01256e
---
a {
color: $Blue$;
text-decoration: underline;
background: transparent;
}
When I add the needed fields manually to a new context, everything works
again. Some built-in fields (like $url$ and $path$) are being expanded as
usual. I think the issue is that the embedded metadata fields are not
getting picked up by defaultContext, but I'm not sure how to fix it.
thanks!
joe
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.