{"action":"created","issue":{"url":"https://api.github.com/repos/spf13/hugo/issues/793","labels_url":"https://api.github.com/repos/spf13/hugo/issues/793/labels{/name}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/793/comments","events_url":"https://api.github.com/repos/spf13/hugo/issues/793/events","html_url":"https://github.com/spf13/hugo/issues/793","id":54135951,"number":793,"title":"`hugo server` not serving subdirectories","user":{"login":"trombonehero","id":85833,"avatar_url":"https://avatars.githubusercontent.com/u/85833?v=3","gravatar_id":"","url":"https://api.github.com/users/trombonehero","html_url":"https://github.com/trombonehero","followers_url":"https://api.github.com/users/trombonehero/followers","following_url":"https://api.github.com/users/trombonehero/following{/other_user}","gists_url":"https://api.github.com/users/trombonehero/gists{/gist_id}","starred_url":"https://api.github.com/users/trombonehero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trombonehero/subscriptions","organizations_url":"https://api.github.com/users/trombonehero/orgs","repos_url":"https://api.github.com/users/trombonehero/repos","events_url":"https://api.github.com/users/trombonehero/events{/privacy}","received_events_url":"https://api.github.com/users/trombonehero/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spf13/hugo/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/spf13/hugo/labels/discussion","name":"discussion","color":"c7def8"},{"url":"https://api.github.com/repos/spf13/hugo/labels/Docs","name":"Docs","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"anthonyfok","id":1274764,"avatar_url":"https://avatars.githubusercontent.com/u/1274764?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonyfok","html_url":"https://github.com/anthonyfok","followers_url":"https://api.github.com/users/anthonyfok/followers","following_url":"https://api.github.com/users/anthonyfok/following{/other_user}","gists_url":"https://api.github.com/users/anthonyfok/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonyfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonyfok/subscriptions","organizations_url":"https://api.github.com/users/anthonyfok/orgs","repos_url":"https://api.github.com/users/anthonyfok/repos","events_url":"https://api.github.com/users/anthonyfok/events{/privacy}","received_events_url":"https://api.github.com/users/anthonyfok/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spf13/hugo/milestones/5","labels_url":"https://api.github.com/repos/spf13/hugo/milestones/5/labels","id":761515,"number":5,"title":"v0.13","description":"","creator":{"login":"spf13","id":173412,"avatar_url":"https://avatars.githubusercontent.com/u/173412?v=3","gravatar_id":"","url":"https://api.github.com/users/spf13","html_url":"https://github.com/spf13","followers_url":"https://api.github.com/users/spf13/followers","following_url":"https://api.github.com/users/spf13/following{/other_user}","gists_url":"https://api.github.com/users/spf13/gists{/gist_id}","starred_url":"https://api.github.com/users/spf13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spf13/subscriptions","organizations_url":"https://api.github.com/users/spf13/orgs","repos_url":"https://api.github.com/users/spf13/repos","events_url":"https://api.github.com/users/spf13/events{/privacy}","received_events_url":"https://api.github.com/users/spf13/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":33,"state":"open","created_at":"2014-08-21T15:16:13Z","updated_at":"2015-01-17T22:39:18Z","due_on":"2014-09-25T07:00:00Z","closed_at":null},"comments":12,"created_at":"2015-01-13T00:42:29Z","updated_at":"2015-01-18T02:21:34Z","closed_at":"2015-01-16T01:06:14Z","body":"Hi,\r\n\r\nThanks for hugo: it's a fantastic change from tools like DocPad, which takes minutes (minutes!) to build a not-terribly-complex academic website.\r\n\r\nI'm having trouble, however, using `hugo server` with a baseurl that includes subdirectories. Basically, everything but the front page gets a 404, even though I can see all of the content in the generated `public` directory.\r\n\r\nI can reproduce this with a pretty simple configuration, a lightly modified version of what `hugo create site` gives me. Here is my (reduced) `config.toml` file:\r\n\r\n```toml\r\nbaseurl = \"http://yourSiteHere/~username/foo/bar\"\r\nlanguageCode = \"en-us\"\r\ntitle = \"my new hugo site\"\r\n```\r\n\r\nI have one piece of content, in `content/blog/post.md`:\r\n```markdown\r\n+++\r\ndate = \"2015-01-01T20:28:38-03:30\"\r\ntitle = \"post\"\r\n\r\n+++\r\nThis is the first blog post.\r\n```\r\n\r\nMy `layouts/index.html` file looks like this:\r\n```html\r\n<html>\r\n\t<head><title>{{ .Site.Title }}</title></head>\r\n\t<body>\r\n\t\t<h1>{{ .Site.Title }}</h1>\r\n\r\n\t\t<h2>Links:</h2>\r\n\t\t<ul><li><a href=\"blog/post\">First blog post</a></li></ul>\r\n\t</body>\r\n</html>\r\n```\r\n\r\nWhen I just run `hugo server`, it generates all of the expected files in the `public` directory:\r\n\r\n```\r\npublic/404.html\r\npublic/blog/index.html\r\npublic/blog/index.xml\r\npublic/blog/post/index.html\r\npublic/index.html\r\npublic/index.xml\r\npublic/sitemap.xml\r\n```\r\n\r\nand the sitemap is correct:\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\r\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r\n\r\n  <url>\r\n    <loc>http://localhost:1313/~username/foo/bar/</loc>\r\n    <lastmod>2015-01-01T20:28:38-03:30</lastmod>\r\n    <priority>0</priority>\r\n  </url>\r\n\r\n  <url>\r\n    <loc>http://localhost:1313/~username/foo/bar/blog/post/</loc>\r\n    <lastmod>2015-01-01T20:28:38-03:30</lastmod>\r\n  </url>\r\n\r\n</urlset>\r\n```\r\n\r\nbut the only URL that Hugo actually serves is `http://localhost:1313/~username/foo/bar`. All of the following URLs result in 404 errors:\r\n\r\n```\r\nhttp://localhost:1313/~username/foo/bar/\r\nhttp://localhost:1313/~username/foo/bar/blog\r\nhttp://localhost:1313/~username/foo/bar/blog/\r\nhttp://localhost:1313/~username/foo/bar/blog/index.html\r\nhttp://localhost:1313/blog\r\nhttp://localhost:1313/blog/\r\n```\r\n\r\nAny idea what might be wrong or how it can be fixed?"},"comment":{"url":"https://api.github.com/repos/spf13/hugo/issues/comments/70393757","html_url":"https://github.com/spf13/hugo/issues/793#issuecomment-70393757","issue_url":"https://api.github.com/repos/spf13/hugo/issues/793","id":70393757,"user":{"login":"k4rtik","id":374340,"avatar_url":"https://avatars.githubusercontent.com/u/374340?v=3","gravatar_id":"","url":"https://api.github.com/users/k4rtik","html_url":"https://github.com/k4rtik","followers_url":"https://api.github.com/users/k4rtik/followers","following_url":"https://api.github.com/users/k4rtik/following{/other_user}","gists_url":"https://api.github.com/users/k4rtik/gists{/gist_id}","starred_url":"https://api.github.com/users/k4rtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k4rtik/subscriptions","organizations_url":"https://api.github.com/users/k4rtik/orgs","repos_url":"https://api.github.com/users/k4rtik/repos","events_url":"https://api.github.com/users/k4rtik/events{/privacy}","received_events_url":"https://api.github.com/users/k4rtik/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T02:21:34Z","updated_at":"2015-01-18T02:21:34Z","body":"@bguiz was it `-v` or `-u` that you did?\r\n\r\nYou can otherwise just cd to the hugo directory and do a `git pull --rebase`."}}