From a06e9a7b95d1547b96dddf371ee70acd71a44352 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 15 May 2023 14:33:40 -0700 Subject: [PATCH] aider: Added new layout `chat-transcript.html` that inherits from `default.html` and replaces the content area with the content of the pages that use the `chat-transcript` layout. # 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. --- _layouts/chat-transcript.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 _layouts/chat-transcript.html diff --git a/_layouts/chat-transcript.html b/_layouts/chat-transcript.html new file mode 100644 index 000000000..5e7bcdc39 --- /dev/null +++ b/_layouts/chat-transcript.html @@ -0,0 +1,5 @@ +{% extends "default.html" %} + +{% block content %} +{{ content }} +{% endblock %}