There is one case in the layouts for https://11ty.webc.fun where I have to use $data.page.date instead of page.date. If I understand correctly, $data should only be necessary inside of components, not inside of templates.
In the exact same layout, I’m able to put <p @text="page.data"></p> right above the line with <time :@value="$data.page.date"> and the paragraph renders the stringified date just fine.
I haven’t been able to create a repro for this, I’m afraid. It may have something to do with using a component inside the layout (I’ve created time.webc for formatting dates). It may also be related to https://github.com/11ty/webc/issues/152.
There is one case in the layouts for https://11ty.webc.fun where I have to use
$data.page.date
instead ofpage.date
. If I understand correctly,$data
should only be necessary inside of components, not inside of templates.https://github.com/darthmall/11ty.webc.fun/blob/main/src/_includes/layouts/plain.webc#L9
In the exact same layout, I’m able to put
<p @text="page.data"></p>
right above the line with<time :@value="$data.page.date">
and the paragraph renders the stringified date just fine.I haven’t been able to create a repro for this, I’m afraid. It may have something to do with using a component inside the layout (I’ve created
time.webc
for formatting dates). It may also be related to https://github.com/11ty/webc/issues/152.