I’m setting up a new Middleman project for a personal site. Rather than keeping all articles at the top of the “source” directory, I’d like to move all articles to “source/articles”. However, I don’t want Middleman to generate article in the permalink, so I configured as so:
activate :blog do |blog|
blog.paginate = true
blog.prefix = nil
blog.permalink = "{title}.html"
blog.sources = "articles/{title}.html.md"
end
I know I’m being overly explicit with blog.prefix = nil
but middleman seems to insist on generating the “articles” slug in the permalinks, anyway.
Output from /__middleman/sitemap/
example-article.html
Path articles/example-article.html
Build Path articles/example-article/index.html
URL /articles/example-article/
Source File source/articles/example-article.html.md
Data #<Hashie::Mash date=#<Date: 2012-01-01 ((2455928j,0s,0n),+0s,2299161j)> tags="example" title="Example Article">
test-article.html
Path articles/test-article.html
Build Path articles/test-article/index.html
URL /articles/test-article/
Source File source/articles/test-article.html.md
Data #<Hashie::Mash date=#<Date: 2016-01-22 ((2457410j,0s,0n),+0s,2299161j)> title="Test Article">
Using :title
instead of {title}
seems to have no impact, either.