Use absolute_url to generate the cannonical URL
Starting with Jekyll v3.3, Jekyll ships with `relative_url` and `absolute_url` filters. Rather than manual concatenating strings, we can rely on Jekyll to handle the logic in Ruby land, which takes into account the site's URL (locally and in production), and handles things like double "/"s.
This commit is contained in:
parent
69a6958209
commit
91634d19c0
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% if !page.no_canonical %}<link rel="canonical" href="http://kubernetes.io{{page.url}}" />{% endif %}
|
||||
{% if !page.no_canonical %}<link rel="canonical" href="{{ page.url | absolute_url }}" />{% endif %}
|
||||
<link rel="shortcut icon" type="image/png" href="/images/favicon.png">
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href='https://fonts.googleapis.com/css?family=Roboto+Mono' type='text/css'>
|
||||
|
|
Loading…
Reference in New Issue