Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Paginating Data is not working #16

Open
suresh44t opened this issue Feb 18, 2018 · 2 comments
Open

Paginating Data is not working #16

suresh44t opened this issue Feb 18, 2018 · 2 comments

Comments

@suresh44t
Copy link

i am getting this error:

/.rvm/gems/ruby-2.3.3/bundler/gems/middleman-pagination-86aa6efd5409/lib/middleman/pagination/index_path.rb:41:in index_file_pattern': undefined method index_file' for #Middleman::Application:0x70191708191500 (NoMethodError)

Gemfile:

gem "middleman", "~>4.2.1"
gem 'middleman-pagination', "~>1.2.0", :git => "https://github.com/jc00ke/middleman-pagination.git"

data/jokes.yml

- body: abc
- body: xyz
- body: abc
- body: xyz

config.rb

activate :pagination do
  pageable_set :jokes do
    data.jokes
  end
end

index.html.erb

---
pagination:
  for: jokes
  per_page: 10
---
<% pagination.each do |item| %>
	<%= item.body %>
<% end %>
@dagumak
Copy link

dagumak commented Jul 14, 2019

I am getting the same problem. Did you figure out why?

@jclusso
Copy link

jclusso commented Apr 16, 2020

@dagumak it seems like this guy forked and hardcoded the path. Not sure why this doesn't work but I pulled his version and it seems like it's working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants