Repository navigation
New Inject Feature
New inject bundle feature (not enabled by default, opt-in) adds a bundle to every page without needing a getBundle or getBundleFileUrl #53 Pages that already reference the bundle using older methods are skipped.
- Possible mode values:
"inline"(trueis shorthand),"file", or"size", which inlines bundles up tomaxInlineSizebytes (default4096) and writes larger ones to a file. location:"<title>","</head>"(default),"<body>", or"</body>"missingLocation:"ignore"(default),"error","append", or"prepend".- An optional
htmlcallback customizes the markup.
export default function($config) {
$config.addBundle("css", { inject: "inline" });
}// Full options list
export default function($config) {
$config.addBundle("css", {
inject: {
mode: "inline", // or "file" or "size"
location: "</head>", // or "<title>", "<body>", "</body>"
missingLocation: "ignore", // or "error", "append", "prepend"
maxInlineSize: 4096, // bytes, only used by "size"
html: ({ mode, name }) => mode === "inline"
? `<style>%s</style>`
: `<link rel="stylesheet" href="%s">`,
},
});
}Other changes
- Fixes #54 with nonce added to out of order render placeholders
- Swaps
posthtml-match-helperfor the zero-dependency@11ty/posthtml-match-selector - Swap from
node:cryptoto web standard WebCrypto
Full Changelog: v4.0.3...v4.1.0