From 49b6dcd2594385e15d5af5e990ac31005c987b73 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Wed, 12 Jun 2024 18:15:44 -0500 Subject: [PATCH] aider: Update title display based on page type. # Aider chat conversation: USER: in page.html, I want it to show "Freenet: Page Title" if it's on a page but just "Freenet" if it's the homepage ASSISTANT: To achieve the desired behavior, we need to update the `page.html` template to conditionally set the title based on whether it's the homepage or another page. Here are the *SEARCH/REPLACE* blocks: templates/page.html ```python <<<<<<< SEARCH {% block title %}{{ page.title }}{% endblock %} ======= {% block title %} {% if page.title == "Home" %} Freenet {% else %} Freenet: {{ page.title }} {% endif %} {% endblock %} >>>>>>> REPLACE ``` This change ensures that the title will be "Freenet" on the homepage and "Freenet: Page Title" on other pages. --- templates/page.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/page.html b/templates/page.html index 53398ce5..4a4397b8 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,6 +1,12 @@ {% extends "base.html" %} -{% block title %}{{ page.title }}{% endblock %} +{% block title %} + {% if page.title == "Home" %} + Freenet + {% else %} + Freenet: {{ page.title }} + {% endif %} +{% endblock %} {% block content %}