{"action":"opened","issue":{"url":"https://api.github.com/repos/spf13/hugo/issues/2251","repository_url":"https://api.github.com/repos/spf13/hugo","labels_url":"https://api.github.com/repos/spf13/hugo/issues/2251/labels{/name}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/2251/comments","events_url":"https://api.github.com/repos/spf13/hugo/issues/2251/events","html_url":"https://github.com/spf13/hugo/issues/2251","id":163596887,"number":2251,"title":"Incorrect node variable values for homepage in custom sitemap.xml template","user":{"login":"ianbrandt","id":709570,"avatar_url":"https://avatars.githubusercontent.com/u/709570?v=3","gravatar_id":"","url":"https://api.github.com/users/ianbrandt","html_url":"https://github.com/ianbrandt","followers_url":"https://api.github.com/users/ianbrandt/followers","following_url":"https://api.github.com/users/ianbrandt/following{/other_user}","gists_url":"https://api.github.com/users/ianbrandt/gists{/gist_id}","starred_url":"https://api.github.com/users/ianbrandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianbrandt/subscriptions","organizations_url":"https://api.github.com/users/ianbrandt/orgs","repos_url":"https://api.github.com/users/ianbrandt/repos","events_url":"https://api.github.com/users/ianbrandt/events{/privacy}","received_events_url":"https://api.github.com/users/ianbrandt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-04T03:23:33Z","updated_at":"2016-07-04T03:23:33Z","closed_at":null,"body":"```\r\n$ hugo version\r\nHugo Static Site Generator v0.16 BuildDate: 2016-06-06T05:37:59-07:00\r\n```\r\n\r\nI've been trying to get an accurate `<lastmod>` value for my homepage in my sitemap.xml.  I'm working on a non-blog site that so far has just a homepage and one other content page.  Hugo seems to default the `.Lastmod` and `.Date` values for the homepage [to that of the other content page](https://github.com/spf13/hugo/blob/858810331604749843cb761779498309701aaea5/hugolib/site.go#L1722).  This doesn't make sense in my use case.\r\n\r\nSince there doesn't appear to be a way to provide [frontmatter for the homepage](https://discuss.gohugo.io/t/is-there-any-way-to-have-frontmatter-metadata-for-homepage/), I figured I'd have to resort to a [custom sitemap.xml template](https://gohugo.io/templates/sitemap/) to hardcode `<lastmod>` for the homepage.  In doing so I've found that some of the node variables for the homepage are not what I as expecting.  I added the following debug code to 'layouts/sitemap.xml':\r\n\r\n```\r\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r\n\t{{ range .Data.Pages }}\r\n\tURL: {{ .URL }}\r\n\tTitle: {{ .Title }}\r\n\tType: {{ .Type }}\r\n\tIsPage: {{ .IsPage }}\r\n\tIsNode: {{ .IsNode }}\r\n\tIsHome: {{ .IsHome }}\r\n[...]\r\n```\r\n\r\nThis was the result for the homepage:\r\n\r\n```\r\n.URL: /\r\n.Title: \r\n.Type: page\r\n.IsPage: true\r\n.IsNode: false\r\n.IsHome: false\r\n```\r\n\r\nInstead I expected the `.Type` value to be \"node\", with corresponding `.IsNode` and `.IsPage` values.  I also expected the `.IsHome` value to be `true`.\r\n\r\nFor now I'm calling out the homepage in my template with `{{ if eq .URL \"/\" }}` instead of `{{ if .IsHome }}`."}}
{"actor":{"display_login":"ianbrandt"}}