8000 Does `webc:root` work with layouts? · Issue #207 · 11ty/webc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Does webc:root work with layouts? #207
Open
@urob

Description

@urob

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0