#webc

2025-05-08

#introduction

I make websites. Sometimes I toot about it.
#eleventy #webc #php #statamic #laravel #tailwindcss #alpinejs uhhh whatever #sql and I guess #nginx #docker and all that crap all the way down. #fullstack

I play RPGs with friends. Sometimes I toot about it.
#ttrpg #dnd #pathfinder #5e #pf2e

I am my group's sysadmin. Sometimes I toot about it.
#selfhosted #plex #lemmy #mastodon #pihole and throw some darts at selfh.st and you catch the rest.

Hot takes, bad jokes, etc.

2025-05-08

I just launched catalog.muralarts.org for Mural Arts Philadelphia. (Design by CooperGraphicDesign.com.)

Built with @zachleat's #eleventy, #webc, and a bastardized version of the `eleventy-image` plugin that makes optimized CSS background images. I call it back-breaker.

Rendering very many AVIF images suuuuuucked on my potato PC, but it was absolutely necessary for such an image heavy design.

2025-05-06

#11ty #webc props question! which method do you prefer? bonus points for why ✨

Option 1
<foo-component :bar="baz" :bing="boop"></foo-component>

Option 2
<foo-component :props_object="({bar: 'baz', bing: 'boop'})"></foo-component>

Harris Lapiroffharris@social.coop
2025-02-23

I really want to like #WebC for #11ty—there’s a lot of things I do like about it, both conceptually and in practice!—but I keep running into a lot of frustrating moments that are either limitations or bugs. The documentation is pretty underspecified so it’s not always clear to me which they are.

Ollie Boermansollicle
2025-01-20

Oh man, just figured out what I was doing wrong `:@‍text="exif. Flash"` was _never_ going to work. I spent much too long looking at the data.

Fortunately `@‍text="exif. Flash"` totally does! 🤦‍♂️

@zachleat I’m guessing `:@‍text` doesn’t mean `@‍text` so we can still `:@‍text="'hello'"`?

2024-12-23

ok, i think I'm ready for someone to kick the tires.
github.com/hiimmrdave/eleventy
#eleventy #webc

Pelle Wessmanvoxpelli
2024-10-29

@zachleat What's the state of would you say?

It's a bit hard to say by looking at the repo alone, where no commits or release can be seen in the last 1.5 years: github.com/11ty/webc

I see that the WebC base has seen updates recently and I noticed you mentioned it to @brad_frost the other day fediverse.zachleat.com/@zachle

Maybe do what @ada did to her web component helper and do a commit to update the README with current state? github.com/AdaRoseCannon/html-

Fynn Ellie Beckermvsde
2024-09-14

I finally finished the blog post I started 3 months ago about rebuilding my website with WebC and going all minimal design.

fynn.be/blog/website-rebuilt-w

Vince Aggrippino 🇺🇸🇲🇾VinceAggrippino@techhub.social
2024-09-01

Using Eleventy with WebC, you can conditionally add attributes to HTML elements using dynamic attributes.

But there's a gotcha... If it's a `style` or `class` attribute, use an empty string to leave off the attribute. Any other attribute needs boolean `false` to leave off the attribute.

doc:
11ty.dev/docs/languages/webc/#

explanation starts here:
github.com/11ty/webc/issues/15

#11ty #WebC

Screenshot of a code editor containing the following code:

<!-- Example using class attribute -->
<a href="/" :class="entry.url === $page.data.url ? 'active' : ''">Home</a>

<!-- Example using aria-current attribute -->
<a href="/" :aria-current="entry.url === $page.data.url ? 'page' : false">Home</a>
Jasperjraedisch
2024-08-28

@luke I only got into recently and read the docs first, since it felt like the most modern iteration on templating: 11ty.dev/docs/languages/webc/

I combined it with , wrote some glue code, and am quite happy at the moment.

Vince Aggrippino 🇺🇸🇲🇾VinceAggrippino@techhub.social
2024-08-07

How do I identify the current page in a #11ty #WebC component using eleventy-navigation ?

github.com/11ty/eleventy/discu

Vince Aggrippino 🇺🇸🇲🇾VinceAggrippino@techhub.social
2024-08-07

A `webc:scoped` CSS block breaks component props in #11ty #WebC ?

github.com/11ty/eleventy/discu

Vince Aggrippino 🇺🇸🇲🇾VinceAggrippino@techhub.social
2024-08-01

Can I pass arguments to a #WebC component in #11ty?

github.com/11ty/eleventy/discu

Fynn Ellie Beckermvsde
2024-07-18

Look at that, basic semantic highlighting for WebC component tags and keyword attributes inspired by Vue’s VS Code extension.

github.com/mvsde/vscode-webc#s

Example showcasing semantic highlighting in VS Code for WebC:

A WebC component tag is colored light blue as opposed to red for normal tags.

webc:if and webc:for attributes are colored purple instead of red like normal attributes.
Fynn Ellie Beckermvsde
2024-07-09

I was thinking wrong about this. The VS Code feature we want are not symbols but definitions. Fortunately, definitions are not too hard to implement.

So, the newest extension version comes with support for “Go to Definition” and “Peek Definition”.

The readme also got an upgrade with feature screenshots.

Next up on the to do list would be “Go to References” and “Peek References”. Another cool feature, somewhat related to definitions.

github.com/mvsde/vscode-webc

Fynn Ellie Beckermvsde
2024-07-07

It might not look amazing yet, but the prove of concept for Ctrl + clickable WebC component tags is here.

This currently uses VS Code’s document links, which are relatively straightforward to implement, but technically not the correct way to do symbol linking.

So, when I have more time, I’ll dig into the symbol API for extensions, which conveniently lacks any useful documentation / example implementations whatsoever.

github.com/mvsde/vscode-webc/r

Screenshot of a WebC file containing the basic structure of an HTML document (doctype, head, body).

WebC components are highlighted with a link underline and can be Ctrl + clicked to go to the component file.
Fynn Ellie Beckermvsde
2024-07-06

So… I got side-tracked while writing a blog post about the WebC migration of my @eleventy powered website and long story short, I created a VS Code extension for WebC instead 😅

It’s super basic for now, providing just the `.webc` to HTML file association and suggestions for WebC-specific HTML attributes including links on hover to the documentation.

I have more plans though, for example linking tags to their respective files so you can Ctrl+Click.

marketplace.visualstudio.com/i

Fynn Ellie Beckermvsde
2024-06-27

Finally merged and published the WebC rework and light redesign of my website.

I’m by no means a designer (anymore) so I kept things basic and pushed myself to hit that deploy button already after weeks and weeks of being uncertain about it 😅

The site now runs on @eleventy v3 and is fully migrated to ESM, no CommonJS anymore.

fynn.be

2024-06-03

I have just released version 3.0 of Eleventy Excellent, now fully on ESM and with many other changes, including my attempts to learn more about WebC and web components. Contributions very welcome! 💚

eleventy-excellent.netlify.app

#11ty #webc

2024-04-12

Bon… j'ai une nouvelle idée de pet project.

À base de #11ty, #webc , #stimulus & #openprops

Ça va être un peu sport quand même.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst