From 913e4bf19a1fdf50ec251066bd1116903b61981e Mon Sep 17 00:00:00 2001 From: Mischa Date: Sun, 21 Jun 2026 10:43:50 +0200 Subject: [PATCH] feat: pull home page title/subtitle from page content instead of hardcoding --- pages/00.home/home.md | 3 +- themes/intotheeast/blueprints/home.yaml | 37 +++++++++++++++++++++ themes/intotheeast/templates/home.html.twig | 6 ++-- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 themes/intotheeast/blueprints/home.yaml diff --git a/pages/00.home/home.md b/pages/00.home/home.md index 621f978..0eb2729 100644 --- a/pages/00.home/home.md +++ b/pages/00.home/home.md @@ -1,5 +1,6 @@ --- -title: Home +title: Into the East +subtitle: 'A few moments from past journeys' visible: false routable: true --- diff --git a/themes/intotheeast/blueprints/home.yaml b/themes/intotheeast/blueprints/home.yaml new file mode 100644 index 0000000..786c443 --- /dev/null +++ b/themes/intotheeast/blueprints/home.yaml @@ -0,0 +1,37 @@ +title: Home Page + +form: + validation: loose + fields: + tabs: + type: tabs + active: 1 + fields: + content: + type: tab + title: Content + fields: + title: + type: text + label: Title + + header.subtitle: + type: text + label: Subtitle + placeholder: 'A few moments from past journeys' + help: 'Short line shown below the title in between-trips mode' + + publishing: + type: tab + title: Publishing + fields: + header.visible: + type: toggle + label: Visible in nav + highlight: 1 + default: 0 + options: + 1: 'Yes' + 0: 'No' + validate: + type: bool diff --git a/themes/intotheeast/templates/home.html.twig b/themes/intotheeast/templates/home.html.twig index d8f2c09..342cdd1 100644 --- a/themes/intotheeast/templates/home.html.twig +++ b/themes/intotheeast/templates/home.html.twig @@ -251,8 +251,10 @@ homeMap.on('load', function () {
-

Into the East

-

A few moments from past journeys

+

{{ page.title }}

+ {% if page.header.subtitle %} +

{{ page.header.subtitle }}

+ {% endif %}
{% if highlights|length > 0 %}