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

Does webc:root work with layouts? #207

Open
urob opened this issue Jun 6, 2024 · 0 comments
Open

Does webc:root work with layouts? #207

urob opened this issue Jun 6, 2024 · 0 comments

Comments

@urob
Copy link

urob commented Jun 6, 2024

I am trying to use webc:root to add an attribute to the host component of a layout. For instance, in the following example I would like to add class="some-class" to body in the host layout:

_include/base.webc:

<!doctype html>
<html>
  <head> ... </head>
  <body @raw="content"></body>
</html>

page.webc:

---
layout: base.webc
---
<template class="some-class" webc:root>Some content</template>

Conceptually, this seems very similar to the documented purpose of webc:root. Maybe there is a way to make this work already now? Otherwise, this might be a useful feature to support.

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

1 participant