Check if page_titles exists in config.toml

This commit is contained in:
David Janda 2023-06-21 17:51:01 -07:00
parent 07b99b9758
commit fe3dc232d8

View file

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