diff --git a/config.toml b/config.toml index 1d3cc70..2b1ba58 100644 --- a/config.toml +++ b/config.toml @@ -219,6 +219,10 @@ short_date_format = "" # Custom separator used in title tag and posts metadata (between date, time to read, and tags). separator = "•" +# Invert the order of the site title and page title in the browser tab. +# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" +invert_title_order = false + # Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.png" favicon = "img/seedling.png" diff --git a/templates/macros/set_title.html b/templates/macros/set_title.html index fffdb28..a2789cb 100644 --- a/templates/macros/set_title.html +++ b/templates/macros/set_title.html @@ -32,6 +32,10 @@ {%- endif -%} {# Return the final concatenated string. #} -{{- prefix ~ separator ~ suffix -}} +{%- if config.extra.invert_title_order -%} + {{- suffix ~ separator ~ prefix -}} +{%- else -%} + {{- prefix ~ separator ~ suffix -}} +{%- endif -%} {%- endmacro set_title -%} diff --git a/theme.toml b/theme.toml index a92357d..8343ccd 100644 --- a/theme.toml +++ b/theme.toml @@ -104,6 +104,10 @@ short_date_format = "" # Custom separator used in title tag and posts metadata (between date, time to read, and tags). separator = "•" +# Invert the order of the site title and page title in the browser tab. +# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" +invert_title_order = false + # Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.ico" # favicon = ""