Skip to content
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

asset_path is scss is never called #661

Open
braindeaf opened this issue May 28, 2021 · 3 comments
Open

asset_path is scss is never called #661

braindeaf opened this issue May 28, 2021 · 3 comments

Comments

@braindeaf
Copy link

Hi, I'm trying to add in asset_url into our SCSS in our Jekyll project however

body {
  background-image: asset-url("dave.png"); 
  background-image: asset_url("dave.png"); 
 }

I'm wanted to add support for both asset_url and asset-url. But I can't even seem to get asset_url to get called. Is there something I am missing.

We are using...

 # A sample Gemfile
source "https://rubygems.org"

# Github Pages Gems
gem 'github-pages', '~> 204'
gem 'jekyll', '~> 3.8.5'
gem 'github-pages-health-check', '~> 1.16.1'
gem 'html-pipeline', '~> 2.12.3'
gem 'jekyll-avatar', '~> 0.7.0'
gem 'jekyll-assets', group: :jekyll_plugins
gem 'jekyll-coffeescript', '~> 1.1.1'
gem 'jekyll-commonmark-ghpages', '~> 0.1.6'
gem 'jekyll-default-layout', '~> 0.1.4'
gem 'jekyll-feed', '~> 0.13.0'
gem 'jekyll-gist', '~> 1.5.0'
gem 'jekyll-github-metadata', '~> 2.13.0'
gem 'jekyll-mentions', '~> 1.5.1'
gem 'jekyll-optional-front-matter', '~> 0.3.2'
gem 'jekyll-paginate', '~> 1.1.0'
gem 'jekyll-readme-index', '~> 0.3.0'
gem 'jekyll-redirect-from', '~> 0.15.0'
gem 'jekyll-relative-links', '~> 0.6.1'
gem 'jekyll-remote-theme', '~> 0.4.1'
gem 'jekyll-sass-converter', '~> 1.5.2'
gem 'jekyll-seo-tag', '~> 2.6.1'
gem 'jekyll-sitemap', '~> 1.4.0'
gem 'jekyll-swiss', '~> 1.0.0'
gem 'jekyll-theme-architect', '~> 0.1.1'
gem 'jekyll-theme-cayman', '~> 0.1.1'
gem 'jekyll-theme-dinky', '~> 0.1.1'
gem 'jekyll-theme-hacker', '~> 0.1.1'
gem 'jekyll-theme-leap-day', '~> 0.1.1'
gem 'jekyll-theme-merlot', '~> 0.1.1'
gem 'jekyll-theme-midnight', '~> 0.1.1'
gem 'jekyll-theme-minimal', '~> 0.1.1'
gem 'jekyll-theme-modernist', '~> 0.1.1'
gem 'jekyll-theme-primer', '~> 0.5.4'
gem 'jekyll-theme-slate', '~> 0.1.1'
gem 'jekyll-theme-tactile', '~> 0.1.1'
gem 'jekyll-theme-time-machine', '~> 0.1.1'
gem 'jekyll-titles-from-headings', '~> 0.5.3'
gem 'jemoji', '~> 0.11.1'
gem 'kramdown', '~> 1.17.0'
gem 'liquid', '~> 4.0.3'
gem 'minima', '~> 2.5.1'
gem 'nokogiri', '~> 1.10.7'
gem 'rouge', '~> 3.13.0'
gem 'safe_yaml', '~> 1.0.5'
gem 'sass', '~> 3.7.4'

Thank you in advance :)

@annapoorna-r
Copy link

@braindeaf I am facing similar issue, What was the solution you found?

@braindeaf
Copy link
Author

Wow, this was a year ago now :S The commit on our application that I'm looking at. Happy to glance over what you have to help because this drove me crazy for a few days at the time.

gem "jekyll-assets"
# became
gem "jekyll-assets", git: "https://github.com/envygeeks/jekyll-assets", group: :jekyll_plugins

and adding

plugins:
  - jekyll-assets

then using

{% asset screen.css media='screen' %}
{% asset print.css media='print' %}

@annapoorna-r
Copy link

@braindeaf Thank you for your time to look into an year old commit :-) . I will try your solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants