{"action":"opened","issue":{"url":"https://api.github.com/repos/getgrav/grav-plugin-sitemap/issues/43","repository_url":"https://api.github.com/repos/getgrav/grav-plugin-sitemap","labels_url":"https://api.github.com/repos/getgrav/grav-plugin-sitemap/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/getgrav/grav-plugin-sitemap/issues/43/comments","events_url":"https://api.github.com/repos/getgrav/grav-plugin-sitemap/issues/43/events","html_url":"https://github.com/getgrav/grav-plugin-sitemap/issues/43","id":225972573,"number":43,"title":"Multilanguage sets unpublished pages as alternates","user":{"login":"redrohX","id":1741055,"avatar_url":"https://avatars0.githubusercontent.com/u/1741055?v=3","gravatar_id":"","url":"https://api.github.com/users/redrohX","html_url":"https://github.com/redrohX","followers_url":"https://api.github.com/users/redrohX/followers","following_url":"https://api.github.com/users/redrohX/following{/other_user}","gists_url":"https://api.github.com/users/redrohX/gists{/gist_id}","starred_url":"https://api.github.com/users/redrohX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redrohX/subscriptions","organizations_url":"https://api.github.com/users/redrohX/orgs","repos_url":"https://api.github.com/users/redrohX/repos","events_url":"https://api.github.com/users/redrohX/events{/privacy}","received_events_url":"https://api.github.com/users/redrohX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-03T12:40:39Z","updated_at":"2017-05-03T12:40:39Z","closed_at":null,"body":"So I have a lot of multilanguage pages, but for quite a lot of them the parent language is set to `published: false`. What I do see in my sitemap.xml is that these pages are still included there (and generate a 404). What I expect is that pages which are not published don't end up as alternates in the sitemap.xml.\r\n\r\nCurrent situation where the EN version is set to published: false.\r\n```xml\r\n<url>\r\n    <loc>http://www.md.dev/nl-nl/blog/blog-post-in-dutch</loc>\r\n    <xhtml:link rel=\"alternate\" hreflang=\"en\" href=\"http://www.md.dev/blog/blog-post-in-dutch\" />\r\n    <xhtml:link rel=\"alternate\" hreflang=\"nl-nl\" href=\"http://www.md.dev/nl-nl/blog/blog-post-in-dutch\" />\r\n    <lastmod>2017-05-03</lastmod>\r\n    <changefreq>daily</changefreq>\r\n    <priority>1.0</priority>\r\n  </url>\r\n```\r\n\r\nWhat I expect to happen:\r\n```xml\r\n<url>\r\n    <loc>http://www.md.dev/nl-nl/blog/blog-post-in-dutch</loc>\r\n    <xhtml:link rel=\"alternate\" hreflang=\"nl-nl\" href=\"http://www.md.dev/nl-nl/blog/blog-post-in-dutch\" />\r\n    <lastmod>2017-05-03</lastmod>\r\n    <changefreq>daily</changefreq>\r\n    <priority>1.0</priority>\r\n  </url>\r\n```\r\n\r\nAlso I'm not 100% sure if it should set `rel=\"alternate\"` if there is only one URL (and I guess no alternates). But I do expect the unpublished page not to be there."}}
{"actor":{"display_login":"redrohX"}}