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.
This commit is contained in:
Paul Gauthier 2023-05-15 14:33:40 -07:00
parent b66c98d65a
commit a06e9a7b95

View file

@ -0,0 +1,5 @@
{% extends "default.html" %}
{% block content %}
{{ content }}
{% endblock %}