Replies: 2 comments 1 reply
-
my workaround is make the css file a template by adding front matter, then override the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Same here, I have an optional frontmatter item |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Although, this has been partly answeredin #1457, I'm still curious how we could do minor manipulations in CSS files based on some variables from data.
In the linked example, there is a different image for each page, so a
<style>...</style>
block in each html doc is clearly the right solution. However for site-wide styles, that are applied at build time, like fonts & Bootstrap themes, it will be good to have some minimal variables processing in CSS files.If not, us amateurs will start adding bloat to each page with
<style>...</style>
blocks, thus affecting page load performance. I feel this is important so that the client browsers can cache the CSS files rather than reading the CSS from each page load.As an added bonus, it will provide a significant enhance of portability of the base path (
pathPrefix
).Am I missing something? Or is there better way to do this?
Sorry if this has been addressed somewhere else.
Edit: I should have started with this, but "11ty is awesome, and I'm loving it!". Thanks to all the devs and the contributors for such a wonderful resource :-)
Beta Was this translation helpful? Give feedback.
All reactions