Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dns-prefetch for static resources #570

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/_includes/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% if title %}
{% set page_title = title %}
{% elseif currentCategory %}
{% set page_title = currentCategory.title %}
{% set page_title = currentCategory.title %}
{% else %}
{% set page_title = site[hook].title %}
{% endif %}
Expand Down Expand Up @@ -69,6 +69,11 @@
<link rel="preload" href="{{ '/assets/fonts/SpaceMono-Regular-subset.woff2' | url }}" as="font" type="font/woff2" crossorigin>
<link rel="preconnect" href="https://www.googletagmanager.com/">

<link rel="dns-prefetch" href="https://cdnjs.cloudflare.com">
<link rel="dns-prefetch" href="https://images.opencollective.com">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://unpkg.com">

<script>
(function () {
var theme = window.localStorage.getItem("theme");
Expand All @@ -90,7 +95,7 @@
unicode-range: U+40, U+7B, U+7D, U+28, U+29;
font-display: swap;
}

/* Space Grotesk for headings */
@font-face {
font-family: "Space Grotesk";
Expand Down Expand Up @@ -139,7 +144,7 @@
});
}
</script>
{% if page.url != '/play/' %}
{% if page.url != '/play/' %}
<script src="{{ '/assets/js/themes.js' | url }}"></script>
{%- endif -%}
{%- if (hook == "blog_page") -%}
Expand Down