File: 2016-4-20-Polyglot-1.2.0.md

package info (click to toggle)
ruby-jekyll-polyglot 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,196 kB
  • sloc: xml: 1,500; ruby: 947; sh: 10; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
layout: post
title: Polyglot 1.2.0
lang: en
---

A new version of Polyglot has been released! Give it a try!

{% highlight yaml %}
gem install jekyll-polyglot
{% endhighlight %}

and list `jekyll-polyglot` among your listed gems in your `_config.yml`

It involves mostly groundwork to prepare for new features and better multilingual content management. It does have a new feature:

## {% raw %} {% I18n_Headers %} {% endraw %}

Put this tag with the [url of your website](https://github.com/untra/polyglot/blob/site/_includes/head.html#L6) in your `head.html` includes file to get the maximum SEO provided by having a multilingual website. It's the same as the following liquid code:

{% highlight html %}{% raw %}
<meta http-equiv="Content-Language" content="{{site.active_lang}}">
<link rel="alternate"
      hreflang="{{site.default_lang}}"
      href="http://yoursite.com{{page.permalink}}" />
{% for lang in site.languages %}
{% if lang == site.default_lang %}
  {% continue %}
{% endif %}
<link rel="alternate"
    hreflang="{{lang}}"
    href="http://yoursite.com/{{lang}}{{page.permalink}}" />
{% endfor %}
{% endraw %}
{% endhighlight %}

In your header, but faster and cleaner! For more information, see [the SEO page](/seo)