Skip to content

Commit

Permalink
aider: Update title display based on page type.
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
sanity committed Jun 12, 2024
1 parent b8ffa42 commit 49b6dcd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
@@ -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 %}
<article class="content">
Expand Down

0 comments on commit 49b6dcd

Please sign in to comment.