Skip to content

Commit 090e038

Browse files
committed
add robots.txt, add JSON-LD structured query, redirect for RSS feed
1 parent 5f77cb7 commit 090e038

15 files changed

Lines changed: 62 additions & 6 deletions

website/docusaurus.config.ts

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ const config: Config = {
7878
},
7979

8080
title: 'React Native',
81-
tagline: 'A framework for building native apps using React',
82-
organizationName: 'facebook',
81+
tagline:
82+
'A framework for building native apps for Android, iOS, and more using React',
83+
organizationName: 'Meta Platforms, Inc.',
8384
projectName: 'react-native',
8485
url: 'https://reactnative.dev',
8586
baseUrl: '/',
@@ -100,7 +101,7 @@ const config: Config = {
100101
{src: 'https://snack.expo.dev/embed.js', defer: true},
101102
{src: 'https://platform.twitter.com/widgets.js', async: true},
102103
],
103-
favicon: 'img/favicon.ico',
104+
favicon: 'favicon.ico',
104105
titleDelimiter: '·',
105106
customFields: {
106107
users,
@@ -111,6 +112,55 @@ const config: Config = {
111112
locales: ['en'],
112113
},
113114
onBrokenLinks: 'warn',
115+
headTags: [
116+
{
117+
tagName: 'script',
118+
attributes: {
119+
type: 'application/ld+json',
120+
},
121+
innerHTML: JSON.stringify({
122+
'@context': 'https://schema.org/',
123+
'@type': 'WebPage',
124+
'@id': 'https://reactnative.dev/',
125+
url: 'https://reactnative.dev/',
126+
name: 'React Native · Learn once, write anywhere',
127+
description:
128+
'A framework for building native apps for Android, iOS, and more using React',
129+
logo: 'https://reactnative.dev/img/pwa/manifest-icon-192.png',
130+
inLanguage: 'en-US',
131+
}),
132+
},
133+
{
134+
tagName: 'script',
135+
attributes: {
136+
type: 'application/ld+json',
137+
},
138+
innerHTML: JSON.stringify({
139+
'@type': 'WebSite',
140+
'@id': 'https://reactnative.dev/',
141+
url: 'https://reactnative.dev/',
142+
name: 'React Native · Learn once, write anywhere',
143+
description:
144+
'A framework for building native apps for Android, iOS, and more using React',
145+
publisher: 'Meta Platforms, Inc.',
146+
potentialAction: [
147+
{
148+
'@type': 'SearchAction',
149+
target: {
150+
'@type': 'EntryPoint',
151+
urlTemplate: 'https://reactnative.dev/search?q={query}',
152+
},
153+
'query-input': {
154+
'@type': 'PropertyValueSpecification',
155+
valueRequired: true,
156+
valueName: 'query',
157+
},
158+
},
159+
],
160+
inLanguage: 'en-US',
161+
}),
162+
},
163+
],
114164
presets: [
115165
[
116166
'@docusaurus/preset-classic',

website/src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Home from '../components/Home';
1515
const Index = () => {
1616
return (
1717
<Layout
18-
description="A framework for building native apps using React"
18+
description="Framework for creating native apps for Android, iOS, and more using React"
1919
wrapperClassName="homepage">
2020
<Head>
2121
<title>React Native · Learn once, write anywhere</title>

website/static/_redirects

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Redirects from what the browser requests to what we serve
22

3+
# RSS feed
4+
/blog/feed /blog/rss.xml
5+
/blog/feed.xml /blog/rss.xml
6+
37
# Renamed pages
48
/docs/android-setup /docs/getting-started
59
/docs/building-for-apple-tv /docs/building-for-tv
3.69 KB
Loading
-1012 Bytes
Binary file not shown.

website/static/img/opengraph.png

-43.6 KB
Binary file not shown.
-3.21 KB
Loading
-4.24 KB
Loading
-4.65 KB
Loading

0 commit comments

Comments
 (0)