Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2289 #2290

Merged
merged 1 commit into from Mar 7, 2016
Merged

Fix #2289 #2290

merged 1 commit into from Mar 7, 2016

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented Mar 7, 2016

Change how sitemap alternates are generated. Suppose there is a site with en / es translations, and a post with only "en" version.

If SHOW_UNTRANSLATED, because we have a spanish version file, even if untranslated:

 <url>
  <loc>https://example.com/es/posts/foo.html</loc>
  <lastmod>2016-03-07T13:35:00Z</lastmod>
  <xhtml:link rel="alternate" hreflang="en" href="https://example.com/posts/foo.html" />
 </url>
 <url>
  <loc>https://example.com/posts/foo.html</loc>
  <lastmod>2016-03-07T13:35:00Z</lastmod>
 </url>

If SHOW_UNTRANSLATED is False:

 <url>
  <loc>https://example.com/posts/foo.html</loc>
  <lastmod>2016-03-07T13:38:00Z</lastmod>
 </url>

ralsina added a commit that referenced this issue Mar 7, 2016
@ralsina ralsina merged commit 94ff0ad into master Mar 7, 2016
4 checks passed
@ralsina ralsina deleted the fix-2289 branch Mar 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant