{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman-blog/issues/277","labels_url":"https://api.github.com/repos/middleman/middleman-blog/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman-blog/issues/277/comments","events_url":"https://api.github.com/repos/middleman/middleman-blog/issues/277/events","html_url":"https://github.com/middleman/middleman-blog/issues/277","id":125773588,"number":277,"title":"Posts are being served as text/plain","user":{"login":"brandonweiss","id":4727,"avatar_url":"https://avatars.githubusercontent.com/u/4727?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonweiss","html_url":"https://github.com/brandonweiss","followers_url":"https://api.github.com/users/brandonweiss/followers","following_url":"https://api.github.com/users/brandonweiss/following{/other_user}","gists_url":"https://api.github.com/users/brandonweiss/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonweiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonweiss/subscriptions","organizations_url":"https://api.github.com/users/brandonweiss/orgs","repos_url":"https://api.github.com/users/brandonweiss/repos","events_url":"https://api.github.com/users/brandonweiss/events{/privacy}","received_events_url":"https://api.github.com/users/brandonweiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-09T18:31:07Z","updated_at":"2016-01-09T18:55:27Z","closed_at":null,"body":"My setup worked on v3 but I can't figure out how to make it work on v4. My directory structure looks like this:\r\n\r\n```\r\nsource/posts/2015-06-22-some-title.md\r\nsource/posts/2015-06-24-some-other-title.md\r\n```\r\n\r\nMy URLs look like this:\r\n\r\n```\r\nhttp://myblog.com/some-title\r\nhttp://myblog.com/some-other-title\r\n```\r\n\r\nOn v3 my config looked like this:\r\n\r\n```ruby\r\nactivate :blog do |blog|\r\n  blog.sources   = \"posts/{year}-{month}-{day}-{permalink}.html\"\r\n  blog.permalink = \"{permalink}\"\r\n  blog.layout    = \"post\"\r\nend\r\n```\r\n\r\nHaving to append `.html` to the end of `sources` was always kind of weird, but it worked. In v4 I have:\r\n\r\n```ruby\r\nactivate :blog do |blog|\r\n  blog.sources   = \"posts/{year}-{month}-{day}-{title}\"\r\n  blog.permalink = \"{title}\"\r\n  blog.layout    = \"post\"\r\nend\r\n```\r\n\r\nNow they're displayed correctly on the main page, but if I go to a permalink page it's served as `text/plain` instead of `text/html`. How do I get the correct behavior?"},"comment":{"url":"https://api.github.com/repos/middleman/middleman-blog/issues/comments/170269561","html_url":"https://github.com/middleman/middleman-blog/issues/277#issuecomment-170269561","issue_url":"https://api.github.com/repos/middleman/middleman-blog/issues/277","id":170269561,"user":{"login":"brandonweiss","id":4727,"avatar_url":"https://avatars.githubusercontent.com/u/4727?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonweiss","html_url":"https://github.com/brandonweiss","followers_url":"https://api.github.com/users/brandonweiss/followers","following_url":"https://api.github.com/users/brandonweiss/following{/other_user}","gists_url":"https://api.github.com/users/brandonweiss/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonweiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonweiss/subscriptions","organizations_url":"https://api.github.com/users/brandonweiss/orgs","repos_url":"https://api.github.com/users/brandonweiss/repos","events_url":"https://api.github.com/users/brandonweiss/events{/privacy}","received_events_url":"https://api.github.com/users/brandonweiss/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T18:55:27Z","updated_at":"2016-01-09T18:55:27Z","body":"Oh. Why? They didn't before?\r\n\r\nI understand the “tilt” pattern, but it doesn't seem to make any sense here. It makes sense for templates (`foobar.html.erb`), because it's HTML that you want to be parsed as ERB first. But these posts are not HTML with markdown in—they're just markdown, which happens to be converted to HTML. They're data, not templates.\r\n\r\nThat pattern was also created to handle the case where the final type is unknown. It could be `foobar.html.erb` or `foobar.js.erb`. Other middleman pages need that flexibility because they're templates—you might want to generate an XML feed or something. But the blog posts are always going to be HTML.\r\n\r\nRight?"}}