diff --git a/packages/docs/src/components/router-head/router-head.tsx b/packages/docs/src/components/router-head/router-head.tsx index 67f51ef7173..5ab6de96fa8 100644 --- a/packages/docs/src/components/router-head/router-head.tsx +++ b/packages/docs/src/components/router-head/router-head.tsx @@ -1,12 +1,14 @@ -import { component$ } from '@qwik.dev/core'; -import { useDocumentHead, useLocation } from '@qwik.dev/router'; +import { component$, untrack } from '@qwik.dev/core'; +import { DocumentHeadTags, useDocumentHead, useLocation } from '@qwik.dev/router'; import { Social } from './social'; -import { InjectThemeScript } from '../theme-toggle'; import { Vendor } from './vendor'; +/** The dynamic head content */ export const RouterHead = component$(() => { - const { url } = useLocation(); const head = useDocumentHead(); + const { url } = useLocation(); + const href = head.frontmatter?.canonical || untrack(() => url.href); + const title = head.title ? `${head.title} 📚 Qwik Documentation` : `Qwik - Framework reimagined for the edge`; @@ -47,45 +49,23 @@ export const RouterHead = component$(() => { } }, }; - return ( <> - {title} - - - - - - - - - - + {import.meta.env.PROD && ( <> - + )} - {head.meta + s.name !== 'description') - .map((m, key) => ( - - ))} - - {head.links.map((l, key) => ( - - ))} - - {head.styles.map((s, key) => ( -