diff --git a/src/frontend/astro.config.mjs b/src/frontend/astro.config.mjs
index c4b5f17828..b083d84083 100644
--- a/src/frontend/astro.config.mjs
+++ b/src/frontend/astro.config.mjs
@@ -11,6 +11,7 @@ import { aspireVersionPlaceholdersIntegration } from './config/aspire-version-pl
import { remarkAspireVersionPlaceholders } from './config/remark-aspire-version-placeholders.mjs';
import { remarkTypeScriptFirstAppHostTabs } from './config/remark-typescript-first-apphost-tabs.mjs';
import { remarkMermaid } from './config/remark-mermaid.mjs';
+import { starlightIconSprite } from './config/starlight-icon-sprite.mjs';
import catppuccin from '@catppuccin/starlight';
import lunaria from './config/lunaria-starlight.mjs';
import mdx from '@astrojs/mdx';
@@ -66,6 +67,15 @@ export default defineConfig({
cacheDir: './node_modules/.astro',
...(outDir ? { outDir } : {}),
vite: {
+ plugins: [starlightIconSprite()],
+ build: {
+ // Astro inlines processed }
+ initOsAwareTabs();
+ document.addEventListener('astro:page-load', initOsAwareTabs);
+
diff --git a/src/frontend/src/components/starlight/Footer.astro b/src/frontend/src/components/starlight/Footer.astro
index 64e546c548..9c55b81575 100644
--- a/src/frontend/src/components/starlight/Footer.astro
+++ b/src/frontend/src/components/starlight/Footer.astro
@@ -383,12 +383,13 @@ const commit = (import.meta.env.PUBLIC_GIT_COMMIT_ID || import.meta.env.GIT_COMM
}
-
+ document.querySelectorAll('a[href]').forEach((a) => {
+ if (a.hasAttribute('data-brand-license')) return;
+ try {
+ const url = new URL(a.getAttribute('href') ?? '', window.location.origin);
+ if (!/^https?:$/.test(url.protocol)) return;
-
diff --git a/src/frontend/src/components/starlight/Head.astro b/src/frontend/src/components/starlight/Head.astro
index a56cafaece..ee24e67330 100644
--- a/src/frontend/src/components/starlight/Head.astro
+++ b/src/frontend/src/components/starlight/Head.astro
@@ -10,6 +10,8 @@ import SiteTour from '../SiteTour.astro';
import { getStructuredData } from '@utils/structured-data';
import { getOgMetadata } from '@utils/page-metadata';
import { deploymentMetadata } from '@utils/deployment-metadata';
+import appHostPreferencesScriptUrl from '@scripts/apphost-preferences.inline.js?url';
+import wcpConsentScriptUrl from '@scripts/wcp-consent.inline.js?url';
// The Poppins weights that text in the first viewport renders with. The same files back the
// @font-face rules in site.css, so these resolve to the already-emitted assets.
@@ -98,139 +100,7 @@ function computeSourceUrl() {
{structuredData && }
-
+
+{
+ /*
+ * Before paint, hide cookie controls only if a previous visit established that consent is not
+ * required here (unknown => visible, so a required region never loses a control). The rest of
+ * the bootstrap is deferred: it only needs the parsed DOM, and keeping it out of the
+ * render-blocking path means first paint waits on a single small cached file.
+ */
+}
+
');
+ expect(head).not.toContain('var appHostLangLabels');
+});
function root() {
const attributes = new Map();