feat: pull home page title/subtitle from page content instead of hardcoding

This commit is contained in:
2026-06-21 10:43:50 +02:00
parent 6eaa00d612
commit 913e4bf19a
3 changed files with 43 additions and 3 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
--- ---
title: Home title: Into the East
subtitle: 'A few moments from past journeys'
visible: false visible: false
routable: true routable: true
--- ---
+37
View File
@@ -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
+4 -2
View File
@@ -251,8 +251,10 @@ homeMap.on('load', function () {
<div class="home-feed-col"> <div class="home-feed-col">
<div class="home-highlights-header"> <div class="home-highlights-header">
<h1 class="home-highlights-title">Into the East</h1> <h1 class="home-highlights-title">{{ page.title }}</h1>
<p class="home-highlights-subtitle">A few moments from past journeys</p> {% if page.header.subtitle %}
<p class="home-highlights-subtitle">{{ page.header.subtitle }}</p>
{% endif %}
</div> </div>
{% if highlights|length > 0 %} {% if highlights|length > 0 %}