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 helpers not working post upgrading to ruby 2.7 #665

Open
annapoorna-r opened this issue Jul 1, 2022 · 1 comment
Open

Asset helpers not working post upgrading to ruby 2.7 #665

annapoorna-r opened this issue Jul 1, 2022 · 1 comment

Comments

@annapoorna-r
Copy link

annapoorna-r commented Jul 1, 2022

@envygeeks
Hi ,

I am facing issue with below scenario, is there anything I am missing ?

Gemlist

Upgraded ruby verison from 2.5 to 2.7
Jekyll version 3.9.2
Jekyll assets 3.0.6
Sprockets 3.7.2
sprockets-assets latest
sprockets-helpers

In css/main.scss

.bg {
 background: url(asset_path("account_member_roles_1@1x.png"));
}

tried
asset_path , asset_url, image-url, asset-url didn't work

_config.yaml

baseurl: "/help" # the subpath of your site, e.g. /blog/
destination: _site/help
incremental: true

plugins:

  • octopress-autoprefixer
  • jekyll-assets

markdown: kramdown

kramdown:
input: GFM

collections:
articles:
output: true

sass:
sass_dir: css

exclude:

  • /.asset-cache/* # Files with [._#] that Jekyll doesn't alread manage need a leading slash.
  • /.buildkite/*
  • .dockerfileignore
  • Capfile
  • cicd/*
  • circle.yml
  • config/*
  • Dockerfile
  • Gemfile
  • Gemfile.lock
  • gems/*
  • Guardfile
  • lib/*
  • nginx.conf
  • nginx.docker.conf
  • node_modules/*
  • Rakefile
  • README.md
  • script/*
  • spec/*
  • vendor/*

assets:
assets:
- "*.svg"
prefix: "/kb_assets"
sources:
- _kb_assets/images
- _kb_assets/stylesheets
- _kb_assets/javascripts
- _kb_assets/image
- _kb_assets/img
- _kb_assets/css
- _vendor/stylesheets
- _vendor/javascripts
sources:

  • _kb_assets/css
  • _kb_assets/fonts
  • _kb_assets/images
  • _kb_assets/videos
  • _kb_assets/javascript
  • _kb_assets/video
  • _kb_assets/image
  • _kb_assets/img
  • _kb_assets/js
  • _kb_assets/stylesheets
  • css

All css files sit in the root/css folder

@shoorick
Copy link

It seems I have similar problem.

  • ruby-2.7.2
  • jekyll-4.3.2

Maybe I use it wrong way? I added this plugin to existing project which have folders:

  • 📁 _sass
    • 📄📄 *.scss
  • 📁 assets
    • 📁 css
      • 📄 styles.scss — main file
    • 📁 images

I tried to move images and styles to 📁 _assets without any success.

Is there any documentation except README.md?

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