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 beta Unknown tag 'gist' #3906

Closed
sparanoid opened this issue Aug 11, 2015 · 12 comments
Closed

Jekyll beta Unknown tag 'gist' #3906

sparanoid opened this issue Aug 11, 2015 · 12 comments

Comments

@sparanoid
Copy link
Contributor

After searching for a while I still can't resolve it. I just updated jekyll to pre.beta8, and got the following error when compiling my site:

$ bundle exec jekyll build --config _config.yml,_amsf/_config.yml,_app/_data/curtana.yml,_config.dev.yml --drafts --trace

Configuration file: _config.yml
Configuration file: _amsf/_config.yml
Configuration file: _app/_data/curtana.yml
Configuration file: _config.dev.yml
            Source: _app
       Destination: _site
 Incremental build: enabled
      Generating... 
/usr/local/lib/ruby/gems/2.2.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: already initialized constant Rouge::Lexers::Shell::KEYWORDS
/usr/local/lib/ruby/gems/2.2.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: previous definition of KEYWORDS was here
/usr/local/lib/ruby/gems/2.2.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: already initialized constant Rouge::Lexers::Shell::BUILTINS
/usr/local/lib/ruby/gems/2.2.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: previous definition of BUILTINS was here
  Liquid Exception: Liquid syntax error: Unknown tag 'gist' in _drafts/2014-06-11-markup-example.md
/usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:87:in `unknown_tag': Liquid syntax error: Unknown tag 'gist' (Liquid::SyntaxError)
    from /usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:38:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/tag.rb:10:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/document.rb:5:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:122:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:108:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:11:in `block in parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:43:in `measure_time'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:10:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/convertible.rb:112:in `render_liquid'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/convertible.rb:246:in `do_layout'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/post.rb:273:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:180:in `block in render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:178:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:178:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:59:in `process'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/command.rb:28:in `process_site'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:60:in `build'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:35:in `process'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.0.pre.beta8/bin/jekyll:17:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

In _drafts/2014-06-11-markup-example.md:

{% gist sparanoid/55c3dd64f94881017a7b gist.md %}

{% gist sparanoid/87b4b3ec181e90146c74 %}

Main config snippet:

#
# Jekyll basic configurations
#

source:         _app
destination:    _site
timezone:       Asia/Hong_Kong
permalink:      /:categories/:title/
markdown:       kramdown
highlighter:    rouge
include:        ["_pages"]

#
# Additional Markdown settings
#

kramdown:
  input:              GFM
  auto_ids:           true
  footnote_nr:        1
  entity_output:      as_char
  toc_levels:         1..6
  smart_quotes:       lsquo,rsquo,ldquo,rdquo
  enable_coderay:     true
  syntax_highlighter: rouge

Other configs only provide some custom variables.

@pathawks
Copy link
Member

Have you installed the jekyll-gist gem?

@parkr
Copy link
Member

parkr commented Aug 11, 2015

You need that installed and in your gems directive in your config file.

Thanks, @pathawks!

@parkr parkr closed this as completed Aug 11, 2015
wesleifreitas added a commit to wesleifreitas/wesleifreitas.github.io that referenced this issue Jan 2, 2016
Jekyll beta Unknown tag 'gist' #3906
jekyll/jekyll#3906
@demisx
Copy link

demisx commented Mar 25, 2016

I've installed the jekyll-gitst gem, but still getting this error (see below). Am I missing something?

$ gem install jekyll-gist
$ gem list | grep jekyll
jekyll (3.1.2)
jekyll-gist (1.4.0)
jekyll-sass-converter (1.4.0)
jekyll-watch (1.3.1)

$ jekyll serve
Configuration file: /Users/dmoore/projects/demisx/demisx.github.io/_config.yml
            Source: /Users/dmoore/projects/demisx/demisx.github.io
       Destination: /Users/dmoore/projects/demisx/demisx.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Liquid Exception: Liquid syntax error (line 119): Unknown tag 'gist' in /Users/dmoore/projects/demisx/demisx.github.io/_posts/2014-01-13-improve-code-highlighting-in-jekyll.md
jekyll 3.1.2 | Error:  Liquid syntax error (line 119): Unknown tag 'gist'

@envygeeks
Copy link
Contributor

@demisx Make sure jekyll-gist is in your gems list in the configuration: https://jekyllrb.com/docs/plugins/

@demisx
Copy link

demisx commented Mar 25, 2016

@envygeeks Thanks for the heads-up. I believe I already have it:

# in _config.yml
name: "P/MEAN and co."
safe: true
lsi: false
host: localhost
port: 4001
description: Sample description
highlighter: pygments
url: http://demisx.github.io
excerpt_separator: <!--more-->
gems: [jekyll-gist]
``

@DirtyF
Copy link
Member

DirtyF commented Mar 25, 2016

@demisx is it also in your Gemfile in the plugins group ?

group :jekyll_plugins do
   gem "jekyll-gist"
 end

@pathawks
Copy link
Member

is it also in your Gemfile in the plugins group ?

@DirtyF It needs to be in the Gemfile, but it doesn't need to be both in the plugins group and the _config.yml

@demisx
Copy link

demisx commented Mar 25, 2016

I am sorry, but I am not sure where that file is. I had a Jekyll 2.x blog running that I've just upgraded to v3 and started seeing this error. I've tried some suggestions mentioned online, but it didn't help. Here is my Jekyll directory. I don't even see the Gemfile in it:

$ ls -1
BingSiteAuth.xml
README.md
_config.yml
_drafts
_layouts
_plugins
_posts
_site
css
feed.xml
fonts
images
index.md
js

@DirtyF
Copy link
Member

DirtyF commented Mar 25, 2016

@pathawks Thanks for pointing this out, I wasn't sure.

@demisx the error is related to the post 2014-01-13-improve-code-highlighting-in-jekyll.md, there is a problem the the raw end tag line 55. Can't explain why jekyll would yell at a raw tag.

AFAICT if you comment safe:true option and add jekyll-gist in you config file, Jekyll 3.0.3 will build your site without error, as long as you have no raw tag in this post.

@demisx
Copy link

demisx commented Mar 25, 2016

@DirtyF Thanks. Tried that and received a different error:

$ jekyll build
Configuration file: /Users/dmoore/projects/demisx/demisx.github.io/_config.yml
            Source: /Users/dmoore/projects/demisx/demisx.github.io
       Destination: /Users/dmoore/projects/demisx/demisx.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Liquid Exception: undefined local variable or method `end_tag' for #<Jekyll::RawTag:0x007fc6615684c8> in /Users/dmoore/projects/demisx/demisx.github.io/_posts/2014-01-13-improve-code-highlighting-in-jekyll.md
jekyll 3.1.2 | Error:  undefined local variable or method `end_tag' for #<Jekyll::RawTag:0x007fc6615684c8>

Looks this is the block of code that's causing it:

{% raw %}
{% gist 8387126 %}
{% endraw %}

@DirtyF
Copy link
Member

DirtyF commented Mar 25, 2016

If I copy this post in one of my jekyll sites also powered by Jekyll 3.0.3 it works. It must be related to the config I guess.

@vellareadings
Copy link

Hi,

I'm facing the same issue again - but with a more recent version of Jekyll. Please see the link below
https://github.com/jekyll/jekyll/issues/6142

@jekyll jekyll locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants