mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
![]() # Aider chat conversation: USER: if the page is a blog post, show the date ASSISTANT: To show the date if the page is a blog post, we need to modify the `_layouts/default.html` file. We will add a condition to check if the page is a blog post and then display the date accordingly. Here is the *SEARCH/REPLACE* block: _layouts/default.html ```html <<<<<<< SEARCH {% endif %} ======= {% endif %} {% if page.date %} <p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p> {% endif %} >>>>>>> REPLACE ``` This will display the date in the format "Month Day, Year" if the `page.date` variable is set, which is typically the case for blog posts. |
||
---|---|---|
.. | ||
default.html | ||
redirect.html |