middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
326 stars 179 forks source link

How to make paginate work with localize blog? #359

Open sarunw opened 6 years ago

sarunw commented 6 years ago

Expected behaviour

page_articles to return paginate based on locale

Actual behaviour

page_articles return every blog

Steps to reproduce the problem

Here are my config

activate :i18n, :mount_at_root => :th # Mount spanish at root instead

activate :blog do |blog|
  # This will add a prefix to all links, template references and source paths
  # blog.prefix = "blog"

  blog.permalink = "{lang}/{title}.html"
  # Matcher for blog source files
  blog.sources = "articles/{lang}/{year}-{month}-{day}-{title}.html"
  blog.taglink = "tag/{tag}.html"
  # blog.layout = "layout"
  # blog.summary_separator = /(READMORE)/
  # blog.summary_length = 250
  # blog.year_link = "{year}.html"
  # blog.month_link = "{year}/{month}.html"
  # blog.day_link = "{year}/{month}/{day}.html"
  # blog.
  default_extension = ".markdown"

  blog.tag_template = "tag.html"
  # blog.calendar_template = "calendar.html"

  # Enable pagination
  blog.paginate = true
  # blog.per_page = 10
  # blog.page_link = "page/{num}"
end

And my dir is like this

source
- articles
  - en
  - th

Additional information

mrtndwrd commented 6 years ago

@sarunw see my comment at #343 to find my rather hacky workaround. Hope it helps you too!

markets commented 7 months ago

ℹ️ This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.