From f2ef6d4161516e0df86c9e470079a706de279ef0 Mon Sep 17 00:00:00 2001 From: Marcin Mierzejewski Date: Mon, 11 May 2020 23:44:37 +0200 Subject: config: add titleCutting param --- exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 78b24bd..3a3d1f6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,9 @@ theme = "hugo-theme-console" languageCode = "en-us" [params] + # Cutting off the page title to two chars for mobile (console-demo -> co) + titleCutting = true + [[params.navlinks]] name = "about/" url = "about/" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index db80137..381f759 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -33,7 +33,7 @@ + {{ .Site.Title }}:~# {{ range $index, $element := split $url "/" }}{{ $.Scratch.Add "path" $element }}{{ if ne $element "" }}{{ . }}/{{ $.Scratch.Add "path" "/" }}{{ end }}{{ end }}