From f2e2af6f928bda1fbb567458e0d8e06403057e46 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Tue, 19 Jan 2021 10:08:51 +0100 Subject: [PATCH] added option to redirect to baseurl --- README.md | 5 +++++ layouts/partials/head.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index fb3b3cc..87ca8df 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ paginate = 5 # number of articles per page in the index dimForegroundColor = "#bababa" strokeColor = "#4f4f4f" accentColor = "#db5793" + + # redirect to baseURL if current URL host doesn't match + # useful if deploying in gitlab pages with custom domain and don't want + # the username.gitlab.io/website url to persist + forceRedirect = false ``` ## Inject custom content diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 7754b4e..1ff8a8f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,4 +1,9 @@ + {{ if .Site.Params.forceRedirect }} + + {{ end }}