Question

I have made a site using middleman-blog. My articles are stored like the following:

/source/entries/2012-01-01 - Example Article.md

But I am really struggling to set the sources. My Config.rb contains this

blog.sources = "entries/{year}-{month}-{day}\ -\ {title}"
blog.default_extension = ".md" 

How are you meant to deal with spaces?

Was it helpful?

Solution

Spaces in filenames can be tough. The first thing I would try is to not escape the spaces - spaces need to be escaped in shell, but not in Ruby strings. So try this:

blog.sources = "entries/{year}-{month}-{day} - {title}"

Once you've done that, upgrade to middleman-blog 3.5+ - handling of spaces was a bug that's been fixed.

(Edited to reflect the status of the bug fix)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top