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

Doesn't seem to work in latest version of Jekyll #1

Open
stffndk opened this issue Nov 12, 2018 · 2 comments
Open

Doesn't seem to work in latest version of Jekyll #1

stffndk opened this issue Nov 12, 2018 · 2 comments

Comments

@stffndk
Copy link

stffndk commented Nov 12, 2018

Everything is updated to latest version. Plugin added to:

_config.yml:

plugins:
  - jekyll-data-pages

Gemfile:

group :jekyll_plugins do
  gem "jekyll-data-pages", "~> 1.0.0"
end

Running command bundle exec jekyll serve and getting error:

mbp:site2 stffn$ bundle exec jekyll serve
Configuration file: /Users/stffn/www/testsite.dev/site2/_config.yml
            Source: /Users/stffn/www/testsite.dev/site2
       Destination: /Users/stffn/www/testsite.dev/site2/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
jekyll 3.8.5 | Error:  undefined local variable or method `data_spec' for #<JekyllDataPages::Generator:0x00007fc1524d7d88>
Did you mean?  data_pages
@olehpratsko
Copy link
Member

Sorry for the delay. Probably, you made a typo. Try to change data_spec to data_pages.

@michelegera
Copy link

@stffndk this probably happens because you’re using version 1.0.0 of the gem.

Try this:

Gemfile

source 'https://rubygems.org'
git_source(:github) { |name| "https://github.com/#{name}.git" }

# Some gems

group :jekyll_plugins do
  gem 'jekyll-data-pages', github: 'webisland/jekyll-data-pages'
end

_config.yml

data_pages:
  - dataset: list
    permalink: /list/:id/
    layout: list_item
    exclude:
      type: [2]

You shouldn’t need to set jekyll-data-pages in _config.yml since you have it in the jekyll_plugins group.

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

3 participants