11ty / 11ty/webc

Arbitrary HTML asset aggregation

Open
#36 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
46
Avg merge
10m
Merged PRs (30d)
2

Description

We already have CSS/JS asset aggregation. I’d like to see this with arbitrary HTML too. Think of a single WebC component file for a web font that includes both the @font-face CSS and the preload HTML together! Or a WebC icon that only includes a single <g> that aggregates up to a reusable de-duplicated SVG icon set.

<style webc:bucket="priority">
@font-face {
  src: url("font.woff2") format("woff2");
}
</style>

<template webc:bucket="header">
  <link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
</template>
<template webc:bucket="svg-icon">
  <g id="icon-arrow”>
    <path d="…"></path>
  </g>
</template>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing CSS/JS asset aggregation implementation and its entry points. Define how bucketed template HTML should be collected, emitted, and de-duplicated for font preload and SVG icon examples, then verify the behavior alongside the existing aggregation functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.