Skip to content

Support splitting at the layout level #1

Description

@balupton

Would be great if we could have splitting happening at the layout level, in addition to just documents.

For instance we have the document src/documents/index.html that has:

---
layout: page
title: "Index"

---

Welcome

Then we have the layout src/layouts/page.html.eco that has:

---
layout: default

---

<article>
  <h1><%- @document.title %></h1>
  <div><%- @content %></div>
</article>

Then we have the layout src/layouts/default.html.eco that has:

<html>
<head>
  <title><%- @document.title %></article>
</head>
<body>
  <%- @content %>
</body>
</html>

Now say we want to split off at the page level, so we should be able to update src/layouts/page.html.eco with:

---
layout: default
additionalLayouts: ['data']

---

<article>
  <h1><%- @document.title %></h1>
  <div><%- @content %></div>
</article>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions