mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
![]() # Context: USER: make a new layout called chat-transcript.html which is identical to default. can we inherit from default somehow? ASSISTANT: Yes, you can create a new layout called `chat-transcript.html` that inherits from `default.html` using the `{% extends %}` and `{% block %}` tags in Liquid. Here's how to do it: 1. Create a new file called `chat-transcript.html` in the `_layouts` directory. 2. In the new file, use the `{% extends "default.html" %}` tag to inherit from `default.html`. 3. Use the `{% block content %}` and `{% endblock %}` tags to define the content area that will be replaced in the child layout. Here's the new `chat-transcript.html` layout file: ```html _layouts/chat-transcript.html <<<<<<< ORIGINAL ======= {% extends "default.html" %} {% block content %} {{ content }} {% endblock %} >>>>>>> UPDATED ``` This new layout will inherit everything from `default.html` and replace the content area with the content of the pages that use the `chat-transcript` layout. |
||
---|---|---|
.. | ||
chat-transcript.html | ||
default.html |