In this video, you will learn how to use layout chaining with eleventy. Layouts in eleventy can use other layouts. You can also use a different template engine across layouts. This is very handy if we want to wrap some pages with extra markup but not all the pages.
for more information check out the eleventy docs
Khaled Garbaya: [0:00] Let's go the includes, create a new file and call it "main layout." In the front matter data let's type layout. This will be myLayout. In here let's do main style color red.
[0:40] In there, we'll have content and close our main. Now, let's go to the post.md and instead of myLayout let's change this to mainLayout, and hit Save. You can see here that for just the posts, we can set the title to right. That's how you use layout chaining in Eleventy.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!