Skip to content

Commit

Permalink
Used max_page_title_length for more durable title code
Browse files Browse the repository at this point in the history
  • Loading branch information
benji-glitsos-ga committed Oct 3, 2024
1 parent 3a22d19 commit 1096046
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/_templates/product-v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"tables": load('_tables.yaml'),
} %}

{# Terms and static strings #}
{# Constant values #}

{% set max_page_title_length = 200 %}

{% set no_data_terms = {
"dash": "\-",
} %}

{% set access_labels = {
"map": "DEA Maps",
Expand Down Expand Up @@ -50,10 +56,6 @@
"PAUSED": "Currently paused",
} %}

{% set no_data_terms = {
"dash": "\-",
} %}

{# Computed variables #}

{% set maps_list = page.data.maps | selectattr("link", "!=", None) | list %}
Expand Down Expand Up @@ -120,9 +122,9 @@

.. rst-class:: product-page

{{ "=" * 200 }}
{{ page_title }}
{{ "=" * 200 }}
{{ "=" * max_page_title_length }}
{{ page_title | truncate(max_page_title_length) }}
{{ "=" * max_page_title_length }}
{% endset %}

{# HTML end scripts component #}
Expand Down

0 comments on commit 1096046

Please sign in to comment.