Merge pull request #49 from djanda97/44-config-extra-page-titles

Check if page_titles exists in config.toml
This commit is contained in:
Paweł Romanowski 2023-06-22 09:40:17 +02:00 committed by GitHub
commit 23f66764c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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