From 46cfdba2e6e3997384a97f5a4a8a08841c164f32 Mon Sep 17 00:00:00 2001 From: Maxwell G <maxwell@gtmx.me> Date: Thu, 7 Dec 2023 03:30:32 -0600 Subject: [PATCH] Add specific titles for each page (#202) --- templates/404.html | 1 + templates/_base.html | 2 +- templates/ansible-prior-versions.html | 1 + templates/ansible_community.html | 1 + templates/automation-tower-chinese-translations.html | 1 + templates/automation-tower-japanese-translations.html | 1 + templates/automation-tower-korean-translations.html | 1 + templates/automation-tower-prior-versions.html | 1 + templates/community.html | 1 + templates/core-translated-ja.html | 1 + templates/core.html | 1 + templates/developers.html | 1 + templates/ecosystem.html | 1 + templates/maintainers.html | 1 + templates/platform.html | 1 + templates/users.html | 1 + 16 files changed, 16 insertions(+), 1 deletion(-) diff --git a/templates/404.html b/templates/404.html index 15fda7bb..6b4353f6 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,3 +1,4 @@ +{% set page_title = "Not found" %} {% extends "_base.html" %} {% block body %} <section class="container"> <div class="row-fluid-wrapper row-depth-1 row-number-3"> diff --git a/templates/_base.html b/templates/_base.html index d678aa53..670df711 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>{{ base.site_title }}</title> + <title>{{ (page_title ~ " | " if page_title is defined else "") ~ base.site_title }}</title> <meta name="description" content="{{ base.site_description }}" /> <meta name="author" content="{{ base.site_author }}" /> <link rel="stylesheet" diff --git a/templates/ansible-prior-versions.html b/templates/ansible-prior-versions.html index 2d99afce..64b60d2a 100644 --- a/templates/ansible-prior-versions.html +++ b/templates/ansible-prior-versions.html @@ -1,3 +1,4 @@ +{% set page_title = pages.community.archive.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/ansible_community.html b/templates/ansible_community.html index 87d94ca1..8dd491c0 100644 --- a/templates/ansible_community.html +++ b/templates/ansible_community.html @@ -1,3 +1,4 @@ +{% set page_title = pages.community_docs.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/automation-tower-chinese-translations.html b/templates/automation-tower-chinese-translations.html index 8decb0b8..31bdd289 100644 --- a/templates/automation-tower-chinese-translations.html +++ b/templates/automation-tower-chinese-translations.html @@ -1,3 +1,4 @@ +{% set page_title = pages.controller.tower_zh.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/automation-tower-japanese-translations.html b/templates/automation-tower-japanese-translations.html index 864393bf..05e32635 100644 --- a/templates/automation-tower-japanese-translations.html +++ b/templates/automation-tower-japanese-translations.html @@ -1,3 +1,4 @@ +{% set page_title = pages.controller.tower_ja.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/automation-tower-korean-translations.html b/templates/automation-tower-korean-translations.html index b9fc3cdb..60b569a5 100644 --- a/templates/automation-tower-korean-translations.html +++ b/templates/automation-tower-korean-translations.html @@ -1,3 +1,4 @@ +{% set page_title = pages.controller.tower_ko.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/automation-tower-prior-versions.html b/templates/automation-tower-prior-versions.html index 6e9fb672..f7e4fce3 100644 --- a/templates/automation-tower-prior-versions.html +++ b/templates/automation-tower-prior-versions.html @@ -1,3 +1,4 @@ +{% set page_title = pages.controller.archive.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/community.html b/templates/community.html index e54eb6b8..903708f0 100644 --- a/templates/community.html +++ b/templates/community.html @@ -1,3 +1,4 @@ +{% set page_title = pages.community.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/core-translated-ja.html b/templates/core-translated-ja.html index f09de27e..c2c5651e 100644 --- a/templates/core-translated-ja.html +++ b/templates/core-translated-ja.html @@ -1,3 +1,4 @@ +{% set page_title = pages.core.core_ja.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/core.html b/templates/core.html index b7fe115b..3ec12f35 100644 --- a/templates/core.html +++ b/templates/core.html @@ -1,3 +1,4 @@ +{% set page_title = pages.core.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/developers.html b/templates/developers.html index b5077db9..b2d888ae 100644 --- a/templates/developers.html +++ b/templates/developers.html @@ -1,3 +1,4 @@ +{% set page_title = pages.developers.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/ecosystem.html b/templates/ecosystem.html index ddb3ee0b..b4bc7a4b 100644 --- a/templates/ecosystem.html +++ b/templates/ecosystem.html @@ -1,3 +1,4 @@ +{% set page_title = pages.ecosystem.title %} {% extends "_base.html" %} {% block body %} <div class="container"> diff --git a/templates/maintainers.html b/templates/maintainers.html index 70ef81be..9ff5ef85 100644 --- a/templates/maintainers.html +++ b/templates/maintainers.html @@ -1,3 +1,4 @@ +{% set page_title = pages.maintainers.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/platform.html b/templates/platform.html index 8fad502a..d4af6500 100644 --- a/templates/platform.html +++ b/templates/platform.html @@ -1,3 +1,4 @@ +{% set page_title = pages.platform.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component"> diff --git a/templates/users.html b/templates/users.html index 9ec64887..b75c3801 100644 --- a/templates/users.html +++ b/templates/users.html @@ -1,3 +1,4 @@ +{% set page_title = pages.users.title %} {% extends "_base.html" %} {% block body %} <div class="container"> <div class="full-width-bg component">