|
36 | 36 |
|
37 | 37 | <meta charset="utf-8"> |
38 | 38 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 39 | +{%- comment -%} |
| 40 | + Lets supporting browsers scale 1rem with the phone's text size setting. |
| 41 | + Every size in main.css is in rem/em, and nothing sets a root font-size. |
| 42 | +{%- endcomment %} |
| 43 | +<meta name="text-scale" content="scale"> |
39 | 44 | {%- if jekyll.environment == "production" %} |
40 | 45 | {%- comment -%} |
41 | 46 | GitHub Pages cannot send response headers, so the policy is delivered in a |
42 | 47 | meta tag. Keep it in sync when adding third-party embeds. frame-ancestors, |
43 | 48 | report-uri and sandbox are not supported in meta policies. |
| 49 | + 'inline-speculation-rules' allows only the speculation rules below, not |
| 50 | + inline JavaScript. |
44 | 51 | {%- endcomment %} |
45 | | -<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://giscus.app https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://giscus.app; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; media-src 'self' https:; frame-src https://giscus.app https://www.youtube.com https://www.youtube-nocookie.com https://embed.ente.io https://embed.ente.com https://airtable.com; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://www.googletagmanager.com; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests"> |
| 52 | +<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'inline-speculation-rules' https://giscus.app https://www.googletagmanager.com;style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://giscus.app; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; media-src 'self' https:; frame-src https://giscus.app https://www.youtube.com https://www.youtube-nocookie.com https://embed.ente.io https://embed.ente.com https://airtable.com; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://www.googletagmanager.com; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests"> |
46 | 53 | {%- endif %} |
47 | 54 | <meta name="referrer" content="strict-origin-when-cross-origin"> |
48 | 55 |
|
|
80 | 87 | <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Anek+Latin:wdth,wght@75..125,400..800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400..700;1,8..60,400&display=swap"> |
81 | 88 | <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}"> |
82 | 89 | <script src="{{ '/assets/js/site.js' | relative_url }}" defer></script> |
| 90 | +{%- comment -%} |
| 91 | + Chromium browsers fetch a same-site page when the reader hovers or presses |
| 92 | + on its link, so the click opens it from cache. Feeds, the search index and |
| 93 | + files under /assets/ are left out. Other browsers ignore this block. |
| 94 | +{%- endcomment %} |
| 95 | +<script type="speculationrules"> |
| 96 | +{"prefetch": [{"where": {"and": [{"href_matches": "/*"}, {"not": {"href_matches": "/*.xml"}}, {"not": {"href_matches": "/*.json"}}, {"not": {"href_matches": "/assets/*"}}]}, "eagerness": "moderate"}]} |
| 97 | +</script> |
83 | 98 |
|
84 | 99 | {% include structuredata.html %} |
85 | 100 |
|
86 | 101 | {%- if jekyll.environment == "production" and site.google_analytics %} |
87 | | -<script src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}" async></script> |
88 | | -<script src="{{ '/assets/js/analytics.js' | relative_url }}" data-ga-id="{{ site.google_analytics }}" defer></script> |
| 102 | +<script src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}" async fetchpriority="low"></script> |
| 103 | +<script src="{{ '/assets/js/analytics.js' | relative_url }}" data-ga-id="{{ site.google_analytics }}" defer fetchpriority="low"></script> |
89 | 104 | {%- endif %} |
0 commit comments