Add the ability to include page titles in HTML title element

This commit is contained in:
Paweł Romanowski 2023-01-28 12:28:30 +01:00
parent eb82877d3d
commit cfbcb940be
11 changed files with 68 additions and 3 deletions

View file

@ -0,0 +1,17 @@
{% macro title(page_title, main_title) %}
{%- if config.extra.page_titles == "combined" -%}
{%- if page_title -%}
{{ page_title }} | {{ main_title }}
{%- else -%}
{{ main_title }}
{%- endif -%}
{%- elif config.extra.page_titles == "page_only" -%}
{%- if page_title -%}
{{ page_title }}
{%- else -%}
{{ main_title }}
{%- endif -%}
{%- else -%}
{{ main_title }}
{%- endif -%}
{% endmacro title %}