Skip to content

Commit 91cea2b

Browse files
committed
docs: Move preconnect links higher in html
1 parent 7ca0232 commit 91cea2b

File tree

1 file changed

+50
-41
lines changed

1 file changed

+50
-41
lines changed

website/docusaurus.config.ts

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,61 @@ const config: Config = {
2222
markdown: {
2323
mermaid: true,
2424
},
25-
scripts: [],
26-
stylesheets: [
25+
headTags: [
2726
{
28-
rel: 'preconnect',
29-
href: 'https://fonts.gstatic.com',
30-
crossOrigin: true,
27+
tagName: 'link',
28+
attributes: {
29+
rel: 'preconnect',
30+
href: 'https://fonts.gstatic.com',
31+
crossOrigin: 'anonymous',
32+
},
3133
},
3234
{
33-
rel: 'preconnect',
34-
href: 'https://fonts.googleapis.com',
35-
crossOrigin: true,
35+
tagName: 'link',
36+
attributes: {
37+
rel: 'preconnect',
38+
href: 'https://fonts.googleapis.com',
39+
crossOrigin: 'anonymous',
40+
},
3641
},
3742
{
38-
rel: 'preconnect',
39-
href: 'https://cdn.jsdelivr.net',
40-
crossOrigin: true,
43+
tagName: 'link',
44+
attributes: {
45+
rel: 'preconnect',
46+
href: 'https://cdn.jsdelivr.net',
47+
crossOrigin: 'anonymous',
48+
},
49+
},
50+
{
51+
tagName: 'link',
52+
attributes: {
53+
name: 'application-name',
54+
content: 'Reactive Data Client',
55+
},
56+
},
57+
{
58+
tagName: 'link',
59+
attributes: {
60+
rel: 'msapplication-TileColor',
61+
content: '#3e96db',
62+
},
63+
},
64+
{
65+
tagName: 'link',
66+
attributes: {
67+
rel: 'msapplication-config',
68+
content: '/browserconfig.xml',
69+
},
70+
},
71+
{
72+
tagName: 'link',
73+
attributes: {
74+
rel: 'theme-color',
75+
content: '#003a67',
76+
},
4177
},
78+
],
79+
stylesheets: [
4280
{
4381
rel: 'preload',
4482
href: 'https://fonts.googleapis.com/css2?family=Rubik:[email protected]&family=Rubik:ital,wght@1,300..900&family=Roboto+Mono:[email protected]&family=Roboto+Mono:ital,wght@1,100..700&display=swap',
@@ -136,36 +174,7 @@ const config: Config = {
136174
media: 'all',
137175
}, TODO: figure out how to load this*/
138176
],
139-
headTags: [
140-
{
141-
tagName: 'link',
142-
attributes: {
143-
name: 'application-name',
144-
content: 'Reactive Data Client',
145-
},
146-
},
147-
{
148-
tagName: 'link',
149-
attributes: {
150-
rel: 'msapplication-TileColor',
151-
content: '#3e96db',
152-
},
153-
},
154-
{
155-
tagName: 'link',
156-
attributes: {
157-
rel: 'msapplication-config',
158-
content: '/browserconfig.xml',
159-
},
160-
},
161-
{
162-
tagName: 'link',
163-
attributes: {
164-
rel: 'theme-color',
165-
content: '#003a67',
166-
},
167-
},
168-
],
177+
scripts: [],
169178
clientModules: [require.resolve('./src/gtagfix.ts')],
170179
//favicon: '/favicon.ico', we declare our own headers for this above
171180
themes: ['@docusaurus/theme-live-codeblock', '@docusaurus/theme-mermaid'],

0 commit comments

Comments
 (0)