From cbea3b6a9ac16cd351d7b4cf14aacbd76732a6ba Mon Sep 17 00:00:00 2001 From: Colin <1580440944@qq.com> Date: Sat, 7 May 2022 15:16:40 +0800 Subject: [PATCH] feat: rel canonical link using absolute url --- config.toml | 5 ++++- layouts/partials/head.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 37c5f3b..ba0f031 100644 --- a/config.toml +++ b/config.toml @@ -21,6 +21,9 @@ showReadingTime = false # leave empty to disable, enter display text to enable lastModDisplay = "最后修改" rssFullText = true +# custom params +# The values nested under params: will populate the .Site.Params variable for use in templates +canonicalRelLinkBase = 'https://blog.colinx.one/' [languages] [languages.en] @@ -67,7 +70,7 @@ rssFullText = true [languages.zh-cn] title = "Colinx Blog" subtitle = "Colin的个人博客" -keywords = "Colin,个人博客" +keywords = "Colin,个人博客,技术,后端,Linux,前端" copyright = "" menuMore = "显示更多" writtenBy = "作者" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9c458da..01f6b9b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -12,7 +12,7 @@ content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" /> - + {{- partial "prepended_head.html" . }}