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

Jekyll Assets Liquid tags are not recognized #342

Closed
deepfriedbrain opened this issue Oct 22, 2016 · 6 comments
Closed

Jekyll Assets Liquid tags are not recognized #342

deepfriedbrain opened this issue Oct 22, 2016 · 6 comments

Comments

@deepfriedbrain
Copy link

@deepfriedbrain deepfriedbrain commented Oct 22, 2016

I'm trying to add Jekyll Assets to my Jekyll site. I have followed the instructions on the README page and checked (and double-checked) my changes. But somehow when I try to run bundle exec jekyll serve I get an error message:

Liquid Exception: Liquid syntax error (line 47): Unknown tag 'css' in _includes/head.html, included in _layouts/default.html
jekyll 3.1.6 | Error:  Liquid syntax error (line 47): Unknown tag 'css'`. 

The same happens for the js tag as well. Somehow none of the Liquid tags added by jekyll-assets seem to be recognized. I have the jekyll-assets gem in my _config.yml and installed it using bundle update.

Gems in my _config.yml:

gems: [jekyll-paginate, jekyll-sitemap, jekyll-assets]

Gemfile:

source "https://rubygems.org"
ruby RUBY_VERSION

gem 'jekyll-assets'
gem "jekyll-paginate"
gem 'jekyll-sitemap'
gem "uglifier" 
gem "sass" 
gem "github-pages", group: :jekyll_plugins

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (4.2.7)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.4.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.10.0)
    colorator (0.1)
    concurrent-ruby (1.0.2)
    ethon (0.9.1)
      ffi (>= 1.3.0)
    execjs (2.7.0)
    extras (0.1.0)
      forwardable-extended (~> 2.5)
    faraday (0.9.2)
      multipart-post (>= 1.2, < 3)
    fastimage (2.0.0)
      addressable (~> 2)
    ffi (1.9.14)
    forwardable-extended (2.6.0)
    gemoji (2.1.0)
    github-pages (92)
      activesupport (= 4.2.7)
      github-pages-health-check (= 1.2.0)
      jekyll (= 3.1.6)
      jekyll-coffeescript (= 1.0.1)
      jekyll-feed (= 0.5.1)
      jekyll-gist (= 1.4.0)
      jekyll-github-metadata (= 2.0.2)
      jekyll-mentions (= 1.1.3)
      jekyll-paginate (= 1.1.0)
      jekyll-redirect-from (= 0.11.0)
      jekyll-sass-converter (= 1.3.0)
      jekyll-seo-tag (= 2.0.0)
      jekyll-sitemap (= 0.10.0)
      jemoji (= 0.7.0)
      kramdown (= 1.11.1)
      liquid (= 3.0.6)
      listen (= 3.0.6)
      mercenary (~> 0.3)
      rouge (= 1.11.1)
      terminal-table (~> 1.4)
    github-pages-health-check (1.2.0)
      addressable (~> 2.3)
      net-dns (~> 0.8)
      octokit (~> 4.0)
      public_suffix (~> 1.4)
      typhoeus (~> 0.7)
    html-pipeline (2.4.2)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    i18n (0.7.0)
    jekyll (3.1.6)
      colorator (~> 0.1)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 1.1)
      kramdown (~> 1.3)
      liquid (~> 3.0)
      mercenary (~> 0.3.3)
      rouge (~> 1.7)
      safe_yaml (~> 1.0)
    jekyll-assets (2.2.8)
      extras (~> 0.1)
      fastimage (~> 2.0, >= 1.8)
      jekyll (~> 3.1, >= 3.0)
      pathutil (>= 0.8)
      rack (> 1, < 2)
      sprockets (~> 3.3, < 3.7)
    jekyll-coffeescript (1.0.1)
      coffee-script (~> 2.2)
    jekyll-feed (0.5.1)
    jekyll-gist (1.4.0)
      octokit (~> 4.2)
    jekyll-github-metadata (2.0.2)
      jekyll (~> 3.1)
      octokit (~> 4.0)
    jekyll-mentions (1.1.3)
      html-pipeline (~> 2.3)
      jekyll (~> 3.0)
    jekyll-paginate (1.1.0)
    jekyll-redirect-from (0.11.0)
      jekyll (>= 2.0)
    jekyll-sass-converter (1.3.0)
      sass (~> 3.2)
    jekyll-seo-tag (2.0.0)
      jekyll (~> 3.1)
    jekyll-sitemap (0.10.0)
    jekyll-watch (1.5.0)
      listen (~> 3.0, < 3.1)
    jemoji (0.7.0)
      activesupport (~> 4.0)
      gemoji (~> 2.0)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0)
    json (1.8.3)
    kramdown (1.11.1)
    liquid (3.0.6)
    listen (3.0.6)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9.7)
    mercenary (0.3.6)
    mini_portile2 (2.1.0)
    minitest (5.9.1)
    multipart-post (2.0.0)
    net-dns (0.8.0)
    nokogiri (1.6.8.1)
      mini_portile2 (~> 2.1.0)
    octokit (4.3.0)
      sawyer (~> 0.7.0, >= 0.5.3)
    pathutil (0.14.0)
      forwardable-extended (~> 2.6)
    public_suffix (1.5.3)
    rack (1.6.4)
    rb-fsevent (0.9.7)
    rb-inotify (0.9.7)
      ffi (>= 0.5.0)
    rouge (1.11.1)
    safe_yaml (1.0.4)
    sass (3.4.22)
    sawyer (0.7.0)
      addressable (>= 2.3.5, < 2.5)
      faraday (~> 0.8, < 0.10)
    sprockets (3.6.3)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    terminal-table (1.7.3)
      unicode-display_width (~> 1.1.1)
    thread_safe (0.3.5)
    typhoeus (0.8.0)
      ethon (>= 0.8.0)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (3.0.2)
      execjs (>= 0.3.0, < 3)
    unicode-display_width (1.1.1)

PLATFORMS
  ruby

DEPENDENCIES
  github-pages
  jekyll-assets
  jekyll-paginate
  jekyll-sitemap
  sass
  uglifier

RUBY VERSION
   ruby 2.2.2p95

BUNDLED WITH
   1.12.5

I have created the _assets folder and the css, js and img folders underneath _assets, and moved the assets under respective folders. I have removed the front matter from the main.scss file.

I'm not sure what I'm missing here. I'll appreciate any help.

@deepfriedbrain

This comment has been minimized.

Copy link
Author

@deepfriedbrain deepfriedbrain commented Oct 22, 2016

I had to remove github-pages as a dependency and then it worked. I'll close the issue. Thanks.

@danielricecodes

This comment has been minimized.

Copy link

@danielricecodes danielricecodes commented Jun 2, 2017

Does this mean you can't use jekyll-assets with Github Pages at all or you just can't include the gem for some reason?

@driehuis

This comment has been minimized.

Copy link

@driehuis driehuis commented Jan 25, 2018

For the benefit of the googlers out there:

Can't speak for the cause of @deepfriedbrain 's issue, but I encountered the same error (and came googling for it and found this issue) after I ran bundle update on my previously working jekyll site. The update dragged in numerous updates, of note: jekyll-assets 2.3.2 -> 3.0.6.

In my Gemfile, I added gem 'jekyll-assets', '~> 2.3.2' and my site was happy again... Not sure what happened, the docs on https://envygeeks.github.io/jekyll-assets/ still list "js" as a valid tag. It may well be that is has to be preceded by the keyword asset but I had no time to dig deeper.

@envygeeks

This comment has been minimized.

Copy link
Owner

@envygeeks envygeeks commented Jan 25, 2018

Our website is an unreliable source of documentation (right now, I'm working on adding that to my pipeline.. it'll be a few weeks yet.) Yes, every tag but {% asset %} has been removed. As for the GitHub-pages issue, this issue belongs to them, we've not changed anything by way of integration with Jekyll, other than how we hook in, we have people who happily use Jekyll-Assets 3.x with Github Pages and have no problems.

@kingsleytorlowei

This comment has been minimized.

Copy link

@kingsleytorlowei kingsleytorlowei commented Sep 16, 2018

I had to remove github-pages as a dependency and then it worked. I'll close the issue. Thanks.

Hello i have this exact issue and i can't remove github-pages as a dependency because it helps with providing github related errors before pushing to my site repo. I'm trying to host my site on github pages. Is there a way i can get around this?

@envygeeks

This comment has been minimized.

Copy link
Owner

@envygeeks envygeeks commented Sep 16, 2018

If my plugin breaks because of sketchy things github-pages does, you’ll have to file a bug there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.