{"action":"created","issue":{"url":"https://api.github.com/repos/spf13/hugo/issues/1319","labels_url":"https://api.github.com/repos/spf13/hugo/issues/1319/labels{/name}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/1319/comments","events_url":"https://api.github.com/repos/spf13/hugo/issues/1319/events","html_url":"https://github.com/spf13/hugo/issues/1319","id":98697719,"number":1319,"title":"Constructing a Paginator triggers creation of unexpected page1 pages.","user":{"login":"dimo414","id":1885701,"avatar_url":"https://avatars.githubusercontent.com/u/1885701?v=3","gravatar_id":"","url":"https://api.github.com/users/dimo414","html_url":"https://github.com/dimo414","followers_url":"https://api.github.com/users/dimo414/followers","following_url":"https://api.github.com/users/dimo414/following{/other_user}","gists_url":"https://api.github.com/users/dimo414/gists{/gist_id}","starred_url":"https://api.github.com/users/dimo414/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimo414/subscriptions","organizations_url":"https://api.github.com/users/dimo414/orgs","repos_url":"https://api.github.com/users/dimo414/repos","events_url":"https://api.github.com/users/dimo414/events{/privacy}","received_events_url":"https://api.github.com/users/dimo414/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-03T08:39:30Z","updated_at":"2015-08-03T14:28:42Z","closed_at":null,"body":"Demo:\r\n\r\n```\r\n$ mkdir demo\r\n\r\n$ cd demo/\r\n\r\n$ hugo new site .\r\n\r\n$ mkdir themes\r\n\r\n$ cp -R ../hugo/themes/beg/ themes/\r\n\r\n$ cp themes/beg/config.yaml .\r\n\r\n$ rm config.toml\r\n\r\n$ hugo new post/demo.md\r\nC:\\cygwin64\\tmp\\demo\\content\\post\\demo.md created\r\n\r\n$  hugo --buildDrafts -t=beg\r\n1 of 1 draft rendered\r\n0 future content\r\n1 pages created\r\n0 paginator pages created\r\n0 tags created\r\nin 49 ms\r\n\r\n$ find public/ -name *page*\r\n\r\n$ sed -i '1i{{ $paginator := .Paginate .Data.Pages }}' themes/beg/layouts/index.html\r\n\r\n$ hugo --buildDrafts -t=beg\r\n1 of 1 draft rendered\r\n0 future content\r\n1 pages created\r\n1 paginator pages created\r\n0 tags created\r\nin 46 ms\r\n\r\n$ find public/ -name *page*\r\npublic/page1\r\n\r\n$ cat public/page1/index.html\r\n<!DOCTYPE html><html><head><link rel=\"canonical\" href=\"http://example.com/\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0;url=http://example.com/\" /></head></html>\r\n```\r\n\r\nAs you can see, there was not previously a `page1` page, but calling `.Paginate` to construct a paginator starts creating these unexpected `page1` files.\r\n\r\nI don't see a mention of these pages in the [documentation](http://gohugo.io/extras/pagination/), other than:\r\n\r\n```\r\n[SECTION/TAXONOMY/BLANK]/page/1/index.html => redirect to  [SECTION/TAXONOMY/BLANK]/index.html\r\n```\r\n\r\nPerhaps there's a typo, and it should be generating `page/1` not `page1`?  Even so, I would prefer if these files were only generated once the pages *actually* need to be paginated.  Many lists will only ever be a single page by design, and don't need these `page1` pages."},"comment":{"url":"https://api.github.com/repos/spf13/hugo/issues/comments/127261151","html_url":"https://github.com/spf13/hugo/issues/1319#issuecomment-127261151","issue_url":"https://api.github.com/repos/spf13/hugo/issues/1319","id":127261151,"user":{"login":"dimo414","id":1885701,"avatar_url":"https://avatars.githubusercontent.com/u/1885701?v=3","gravatar_id":"","url":"https://api.github.com/users/dimo414","html_url":"https://github.com/dimo414","followers_url":"https://api.github.com/users/dimo414/followers","following_url":"https://api.github.com/users/dimo414/following{/other_user}","gists_url":"https://api.github.com/users/dimo414/gists{/gist_id}","starred_url":"https://api.github.com/users/dimo414/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimo414/subscriptions","organizations_url":"https://api.github.com/users/dimo414/orgs","repos_url":"https://api.github.com/users/dimo414/repos","events_url":"https://api.github.com/users/dimo414/events{/privacy}","received_events_url":"https://api.github.com/users/dimo414/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T14:28:42Z","updated_at":"2015-08-03T14:28:42Z","body":"I'm on Cygwin, running Hugo 0.14.  Seems like a Windows specific issue, I was able to replicate it in the Windows Command Prompt (`$` for Cygwin, `>` for cmd):\r\n\r\n```\r\n$ rm -rf public/*\r\n\r\n> hugo.exe --buildDrafts -t=beg\r\n1 of 1 draft rendered\r\n0 future content\r\n1 pages created\r\n1 paginator pages created\r\n0 tags created\r\nin 29 ms\r\n\r\n$ find public/ -name *page*\r\npublic/page1\r\n```"}}