Paginate over Middleman Local Data

Need something like this

The above plugin is not working with midleman 4.2.1. 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 methodindex_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 %>

Did you ever find something for this? I’m looking as well.