laktek / punch-blog

A boilerplate to create personal blogs based on Punch
MIT License
45 stars 14 forks source link

error when changing blog post url #5

Closed sydcanem closed 11 years ago

sydcanem commented 11 years ago

I only want the post_url to be /{title} instead of the default one, so I changed "post_url" in the config file to "/{title}" but I get errors like this

{ [Error: ENOENT, stat 'posts/undefined-undefined-undefined-index.markdown'] errno: 34, code: 'ENOENT', path: 'posts/undefined-undefined-undefined-index.markdown' } 127.0.0.1 - GET / HTTP/1.1 404 - - 7 ms { [Error: ENOENT, stat 'posts/undefined-undefined-undefined-favicon.markdown'] errno: 34, code: 'ENOENT', path: 'posts/undefined-undefined-undefined-favicon.markdown' } 127.0.0.1 - GET /favicon.ico HTTP/1.1 404 - - 3 ms { [Error: ENOENT, stat 'posts/undefined-undefined-undefined-index.markdown'] errno: 34, code: 'ENOENT', path: 'posts/undefined-undefined-undefined-index.markdown' }

laktek commented 11 years ago

I have pushed an update to punch-blog-content-handler plugin, which should allow you to use a post_url such as /{title}.

However, please note you should also save the post under post directory as {title}.markdown to allow it to be fetched. Also, having such a URL pattern may conflict with regular pages in the site (eg. /about, /contact, etc). So it's recommend to use a distinct URL for posts such as blog/{title}.