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

Proposal: support for rel="alternate" hreflang="x" #27

Open
taringamberini opened this issue Feb 14, 2016 · 0 comments
Open

Proposal: support for rel="alternate" hreflang="x" #27

taringamberini opened this issue Feb 14, 2016 · 0 comments

Comments

@taringamberini
Copy link

It would be nice if the generated translation_id would be used to generate alternate link in <head> section of a post.

Reason behind the proposal

Help search engines to serve the most appropriate (language) content.

Expected behaviour

Write an alternate_lang_link tag in the <head> section of a post layout:

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  {% alternate_lang_link %}
  ...

the tag should search all posts which shares the same translation_id and than for each post it should generate a list of strings for each language like:

<link rel="alternate" hreflang="<POST_LANG>" href="<POST_URL>" />

If an it, en, de, multilingual site had posts at URLs like:

the generated posts should all contains:

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <link rel="alternate" hreflang="it" href="http://www.my-multilingual-site.com/it/blog/post-favoloso" />
  <link rel="alternate" hreflang="en" href="http://www.my-multilingual-site.com/en/blog/awsome-post" />
  <link rel="alternate" hreflang="de" href="http://www.my-multilingual-site.com/de/blog/geweldig-bericht" />
  ...

Thank you very much in advance for your help,
Tarin

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

No branches or pull requests

1 participant