-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS Font Face src file name parsed as property and invalid css #581
Comments
Do you have a full trace and potentially a demo site that can replicate this issue? |
This was from a while ago; let me see if I can throw something together. |
I am having a hard time getting to a point where I can even attempt to reproduce this. I quickly threw together a site on GitLab using their template, uploaded the fonts I used above and added the font-face property to the base.scss file. And for some reason asset_url is not working like it says it would in the README file. It does not appear to be even parsed. This is the resulting CSS file, with the font-face at the top. You will see that asset_url is used (probably incorrectly) and has not been parsed at all like I think I should expect. Here are the latest artifacts from the GitLab Pages build. You can see there that the font is being included on the site under "fonts/Moon Flower/". And this is the repository I just created for demonstrating the original issue. This goes live to https://christiansirolli.gitlab.io/jekyll-bugs so I changed the baseurl to /jekyll-bugs. Other than that, the _config.yml file hasn't been modified from GitLab's template. Not sure what I am doing wrong here. Once I can get the asset_url stuff to actually be parsed, I should be able to reproduce the original issue. |
I looked at your Gemfile, there is not Jekyll Assets in there at all... |
It's been a while since I've done this. So that's probably why. |
I had to workaround an issue where we are getting font-face to work in our site. So thought I'd post here for future ref. Here is how I solved it, by adding this to the header of our site:
(It's a bit dirty - we are having to use Dart Sass for our SCSS compiling, but we can still use Jekyll Assets to handle our webfonts for assets.) |
Is it stripping the |
For us, we could not get it to use asset_url or asset_path as these only seemed to be handled in SCSS / SASS files (which I believe don't get parsed by the plugin because we're using Dart and outputting CSS from that), so I have no comparison - it was just I'd been prompted by yesterday's solution for adding asset paths to try this for us. |
Description
I have a font-family with multiple sources. For some reason this results in a liquid exception being thrown despite it being valid CSS. It seems to be treating the font file name as a CSS property, and thus expects a value instead of the file extension.
Steps
This is the code that I am using:
Output
Whenever I build it using the latest of everything I get this Liquid Exception. I temporarily commented out one line with a ? in the src url due to the issue I opened earlier.
Expected
I expect it to replace asset_url with url with the file name without any errors.
The text was updated successfully, but these errors were encountered: