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

Liquid syntax error - Unknown tag 'seo' included when serving jekyll with safe mode #716

Closed
joshbuker opened this issue Mar 5, 2023 · 3 comments

Comments

@joshbuker
Copy link

When attempting to serve a jekyll site with minima in safe mode, I get the following error:

Liquid Exception: Liquid syntax error (/workspaces/gsd-tools/website/vendor/bundle/ruby/3.2.0/gems/minima-2.5.1/_includes/head.html line 5): Unknown tag 'seo' included in /workspaces/gsd-tools/website/vendor/bundle/ruby/3.2.0/gems/minima-2.5.1/_layouts/default.html
bundler: failed to load command: jekyll (/workspaces/gsd-tools/website/vendor/bundle/ruby/3.2.0/bin/jekyll)
/workspaces/gsd-tools/website/vendor/bundle/ruby/3.2.0/gems/liquid-4.0.4/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (/workspaces/gsd-tools/website/vendor/bundle/ruby/3.2.0/gems/minima-2.5.1/_includes/head.html line 5): Unknown tag 'seo' included  (Liquid::SyntaxError)

This error does not happen if I omit safe mode, although it appears that _includes/custom-head.html is being ignored, as well as setting the theme in _config.yml:

minima:
  theme: dark

Not sure what exactly is going on here, adding jekyll-seo-tag to the plugins does not appear to solve this.

Should be able to replicate the issue with: https://github.com/joshbuker/gsd-tools/tree/7dcc6aa2ed4331bbd5169e0579ba1ac961d26a1e/website

@joshbuker
Copy link
Author

Ah, okay I figured this out after sanity checking my Gemfile.

If anyone else runs into this issue, it appears to be because the plugins minima relies on (jekyll-seo-tag and jekyll-feed) must be included both in your _config.yml and Gemfile.

_config.yml

plugins:
  - jekyll-seo-tag
  - jekyll-feed

Gemfile

group :jekyll_plugins do
  gem 'jekyll-seo-tag'
  gem "jekyll-feed"
end

This doesn't appear to solve the _includes/custom.html or theme issues, but it does solve serving with --safe mode enabled.

@mxkpp
Copy link

mxkpp commented Mar 5, 2023

Thanks @joshbuker for the tip. Would love to be able to use dark theme in safe mode as well.

@joshbuker
Copy link
Author

@mxkpp Per #717, you can enable dark theme by updating to pull from the main branch. Themes aren't supported yet and are to be released in 3.0.

@jekyll jekyll locked and limited conversation to collaborators Mar 7, 2024
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

3 participants