From feda1c29425deaf55d79561d08a1bf24254d9fbd Mon Sep 17 00:00:00 2001 From: Egor Savkin <es@m-labs.hk> Date: Mon, 6 Jan 2025 14:01:42 +0800 Subject: [PATCH] Add alternate links to target different regions and make .hk site canonical Signed-off-by: Egor Savkin <es@m-labs.hk> --- templates/_base.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/_base.html b/templates/_base.html index b241e9c..c703f2f 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -18,7 +18,7 @@ {% endblock %} <meta property="og:site_name" content="{{ config.extra.author }}"> <meta property="og:url" content="{{ config.base_url }}"> - <meta property="og:image" content={{ get_url(path='images/logo@2x.png', cachebust=true) }}> + <meta property="og:image" content="{{ get_url(path='images/logo@2x.png', cachebust=true) }}"> {% block meta %}{% endblock meta %} <meta name="theme-color" content="#715ec7"> @@ -42,6 +42,11 @@ <link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="shortcut icon" type="image/x-icon"> <link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="icon" type="image/x-icon"> + <link href="https://m-labs.hk{{ current_path | safe }}" rel="canonical" > + <link href="https://m-labs.hk{{ current_path | safe }}" rel="alternate" hreflang="x-default" > + <link href="https://m-labs.ph{{ current_path | safe }}" rel="alternate" hreflang="en-ph" > + <link href="https://m-labs-intl.com{{ current_path | safe }}" rel="alternate" hreflang="en-us" > + {% block links %}{% endblock %} {% block styles %}