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

Middleman 4 support #10

Open
vietqhoang opened this issue Jan 20, 2016 · 2 comments
Open

Middleman 4 support #10

vietqhoang opened this issue Jan 20, 2016 · 2 comments

Comments

@vietqhoang
Copy link

At the moment middleman-pagination has a ~> 3.3 dependency on middleman-core, which sets a restriction on Middleman 4 support.

@Oreolek
Copy link

Oreolek commented Dec 1, 2016

There's a fork with no restriction in its Gemfile.

@suresh44t
Copy link

@Oreolek i have used your fork, but 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 %>

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