Skip to content

Commit

Permalink
chore: preload font-face woff2
Browse files Browse the repository at this point in the history
  • Loading branch information
robsongajunior committed Dec 6, 2024
1 parent c4ecae3 commit 30123e5
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/components/HeadCommon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
import { FAVICON_URL, FONTS_URL } from '~/consts';
---

<!-- Global Metadata -->
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- <meta name="theme-color" content="hsl(256, 44%, 15%)" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="hsl(273, 37%, 93%)" media="(prefers-color-scheme: light)" /> -->

<meta name="generator" content={Astro.generator} />

<link rel="icon" type="image/png" href={FAVICON_URL} />
Expand All @@ -21,14 +16,14 @@ import { FAVICON_URL, FONTS_URL } from '~/consts';
<link rel="apple-touch-icon-precomposed" href={FAVICON_URL} sizes="144x144" />
<link rel="apple-touch-icon-precomposed" href={FAVICON_URL} sizes="152x152" />

<link rel="dns-prefetch" href={FONTS_URL} />
<!-- <link rel="prerender" href="https://example.com/about.html" /> -->
<link crossorigin as="font" type="font/woff2" rel="preload" href={`${FONTS_URL}/roboto/roboto-regular.woff2`} />
<link crossorigin as="font" type="font/woff2" rel="preload" href={`${FONTS_URL}/roboto/roboto-medium.woff2`} />

<!-- Scrollable a11y code helper -->
<script type="module" src="/assets/docs/js/make-scrollable-code-focusable.js"></script>
<link rel="preconnect" href="https://www.googletagmanager.com/" />
<link rel="preconnect" href="https://www.google-analytics.com" />

<!-- Double-click to highlight code blocks (inline only). -->
<script is:inline>
<script type="module" src="/assets/docs/js/make-scrollable-code-focusable.js"></script>
<script is:inline type="text/javascript">
document.addEventListener('dblclick', (el) => {
const node = el.target;
if (!node) return;
Expand Down

0 comments on commit 30123e5

Please sign in to comment.