diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index e5c7adab75d..4463a4a813c 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -78,8 +78,9 @@ const config: Config = { }, title: 'React Native', - tagline: 'A framework for building native apps using React', - organizationName: 'facebook', + tagline: + 'A framework for building native apps for Android, iOS, and more using React', + organizationName: 'Meta Platforms, Inc.', projectName: 'react-native', url: 'https://reactnative.dev', baseUrl: '/', @@ -100,7 +101,7 @@ const config: Config = { {src: 'https://snack.expo.dev/embed.js', defer: true}, {src: 'https://platform.twitter.com/widgets.js', async: true}, ], - favicon: 'img/favicon.ico', + favicon: 'favicon.ico', titleDelimiter: '·', customFields: { users, @@ -111,6 +112,62 @@ const config: Config = { locales: ['en'], }, onBrokenLinks: 'warn', + headTags: [ + { + tagName: 'script', + attributes: { + type: 'application/ld+json', + }, + innerHTML: JSON.stringify({ + '@context': 'https://schema.org/', + '@type': 'WebPage', + '@id': 'https://reactnative.dev/', + url: 'https://reactnative.dev/', + name: 'React Native · Learn once, write anywhere', + description: + 'A framework for building native apps for Android, iOS, and more using React', + logo: 'https://reactnative.dev/img/pwa/manifest-icon-192.png', + inLanguage: 'en-US', + }), + }, + { + tagName: 'script', + attributes: { + type: 'application/ld+json', + }, + innerHTML: JSON.stringify({ + '@type': 'WebSite', + '@id': 'https://reactnative.dev/', + url: 'https://reactnative.dev/', + name: 'React Native · Learn once, write anywhere', + description: + 'A framework for building native apps for Android, iOS, and more using React', + publisher: 'Meta Platforms, Inc.', + potentialAction: [ + { + '@type': 'SearchAction', + target: { + '@type': 'EntryPoint', + urlTemplate: 'https://reactnative.dev/search?q={query}', + }, + 'query-input': { + '@type': 'PropertyValueSpecification', + valueRequired: true, + valueName: 'query', + }, + }, + ], + inLanguage: 'en-US', + }), + }, + { + tagName: 'link', + attributes: { + rel: 'apple-touch-icon', + href: '/img/pwa/apple-icon-180.png', + }, + }, + ], presets: [ [ '@docusaurus/preset-classic', @@ -149,10 +206,6 @@ const config: Config = { require.resolve('./src/css/versions.scss'), ], }, - // TODO: GA is deprecated, remove once we're sure data is streaming in GA4 via gtag. - googleAnalytics: { - trackingID: 'UA-41298772-2', - }, gtag: { trackingID: 'G-58L13S6BDP', }, @@ -504,6 +557,7 @@ const config: Config = { content: 'https://reactnative.dev/img/logo-share.png', }, {name: 'twitter:site', content: '@reactnative'}, + {name: 'apple-mobile-web-app-capable', content: 'yes'}, ], } satisfies Preset.ThemeConfig, }; diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index cd743b733d4..14fc61d31fc 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -15,7 +15,7 @@ import Home from '../components/Home'; const Index = () => { return ( React Native · Learn once, write anywhere diff --git a/website/static/_redirects b/website/static/_redirects index cd366db3423..c52ac3b66fb 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -1,5 +1,9 @@ # Redirects from what the browser requests to what we serve +# RSS feed +/blog/feed /blog/rss.xml +/blog/feed.xml /blog/rss.xml + # Renamed pages /docs/android-setup /docs/getting-started /docs/building-for-apple-tv /docs/building-for-tv diff --git a/website/static/docs/assets/favicon.png b/website/static/docs/assets/favicon.png deleted file mode 100644 index cf2ef56b9f7..00000000000 Binary files a/website/static/docs/assets/favicon.png and /dev/null differ diff --git a/website/static/img/favicon.ico b/website/static/favicon.ico similarity index 100% rename from website/static/img/favicon.ico rename to website/static/favicon.ico diff --git a/website/static/img/header_logo.png b/website/static/img/header_logo.png deleted file mode 100644 index 8858ffa29da..00000000000 Binary files a/website/static/img/header_logo.png and /dev/null differ diff --git a/website/static/img/opengraph.png b/website/static/img/opengraph.png deleted file mode 100644 index 6ce4046cf79..00000000000 Binary files a/website/static/img/opengraph.png and /dev/null differ diff --git a/website/static/img/pwa/apple-icon-120.png b/website/static/img/pwa/apple-icon-120.png deleted file mode 100644 index ae896ac96f2..00000000000 Binary files a/website/static/img/pwa/apple-icon-120.png and /dev/null differ diff --git a/website/static/img/pwa/apple-icon-152.png b/website/static/img/pwa/apple-icon-152.png deleted file mode 100644 index 3582a22e0e8..00000000000 Binary files a/website/static/img/pwa/apple-icon-152.png and /dev/null differ diff --git a/website/static/img/pwa/apple-icon-167.png b/website/static/img/pwa/apple-icon-167.png deleted file mode 100644 index 4becaeb37a6..00000000000 Binary files a/website/static/img/pwa/apple-icon-167.png and /dev/null differ diff --git a/website/static/img/pwa/apple-icon-180.png b/website/static/img/pwa/apple-icon-180.png index 2253ad83546..42fc975537a 100644 Binary files a/website/static/img/pwa/apple-icon-180.png and b/website/static/img/pwa/apple-icon-180.png differ diff --git a/website/static/img/pwa/manifest-icon-192.maskable.png b/website/static/img/pwa/manifest-icon-192.maskable.png new file mode 100644 index 00000000000..f7510bda92c Binary files /dev/null and b/website/static/img/pwa/manifest-icon-192.maskable.png differ diff --git a/website/static/img/pwa/manifest-icon-192.png b/website/static/img/pwa/manifest-icon-192.png index 59eb921d61b..bdf4f6de3b3 100644 Binary files a/website/static/img/pwa/manifest-icon-192.png and b/website/static/img/pwa/manifest-icon-192.png differ diff --git a/website/static/img/pwa/manifest-icon-512.maskable.png b/website/static/img/pwa/manifest-icon-512.maskable.png new file mode 100644 index 00000000000..ee6df11d13e Binary files /dev/null and b/website/static/img/pwa/manifest-icon-512.maskable.png differ diff --git a/website/static/img/pwa/manifest-icon-512.png b/website/static/img/pwa/manifest-icon-512.png index 0a049ed2c9d..a4a5e76e90b 100644 Binary files a/website/static/img/pwa/manifest-icon-512.png and b/website/static/img/pwa/manifest-icon-512.png differ diff --git a/website/static/manifest.json b/website/static/manifest.json index b1873325876..9353a7793d5 100644 --- a/website/static/manifest.json +++ b/website/static/manifest.json @@ -1,7 +1,7 @@ { - "name": "React Native Documentation", + "name": "React Native · Learn once, write anywhere", "short_name": "React Native", - "description": "Learn once, write anywhere.", + "description": "A framework for building native apps for Android, iOS, and more using React", "theme_color": "#20232a", "background_color": "#20232a", "display": "minimal-ui", @@ -43,16 +43,28 @@ ], "icons": [ { - "src": "img/pwa/manifest-icon-192.png", + "src": "static/img/pwa/manifest-icon-192.png", "sizes": "192x192", "type": "image/png", - "purpose": "any maskable" + "purpose": "any" }, { - "src": "img/pwa/manifest-icon-512.png", + "src": "static/img/pwa/manifest-icon-192.maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "static/img/pwa/manifest-icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "static/img/pwa/manifest-icon-512.maskable.png", "sizes": "512x512", "type": "image/png", - "purpose": "any maskable" + "purpose": "maskable" } ] } diff --git a/website/static/robots.txt b/website/static/robots.txt new file mode 100644 index 00000000000..eb0536286f3 --- /dev/null +++ b/website/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: