Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support splitting at the layout level #1

Open
balupton opened this issue Aug 7, 2013 · 2 comments
Open

Support splitting at the layout level #1

balupton opened this issue Aug 7, 2013 · 2 comments

Comments

@balupton
Copy link
Member

balupton commented Aug 7, 2013

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>
@neilbaylorrulez
Copy link
Contributor

Good idea.

Let me see how easily I can make it happen

@RobLoach
Copy link
Contributor

Interesting, would solve the problem of having to inject additionalLayouts in the document models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants