middleman / middleman-blog

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

{lang} variable not working inside custom collection link #348

Open passatgt opened 7 years ago

passatgt commented 7 years ago

Expected behaviour

The following code should generate category archive pages for every language: localhost:4567/en/category localhost:4567/hu/category

Actual behaviour

The {lang} variable is not parsed at blog.custom_collections.category.link, so i get category archives without the proper locale

Steps to reproduce the problem

activate :blog do |blog|
  blog.sources = "articles/{lang}/{year}-{month}-{day}-{title}.html"
  blog.permalink = "{lang}/articles/{category}/{title}.html"
  blog.layout = "article"
  blog.custom_collections = {
    category: {
      link: '{lang}/{category}.html',
      template: 'category.html'
    }
  }
end

With two files located in: source/articles/en/2017-01-01-title-en.html.markdown source/articles/hu/2017-01-01-title-hu.html.markdown

And both files include category:Something in frontmatter

Additional information

markets commented 3 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.