Skip to content

Commit 07bfb79

Browse files
authored
docs: Improve meta tags & SEO (#81)
* docs: Improve meta tags * chore: Fix path for SEO
1 parent 1de3437 commit 07bfb79

4 files changed

Lines changed: 32 additions & 25 deletions

File tree

website/docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
88
const config = {
99
title: 'React Native Owl',
1010
tagline: 'Visual Regression Testing for React Native',
11-
url: 'https://formidable.com/',
11+
url: 'https://formidable.com',
1212
baseUrl: '/open-source/react-native-owl/',
1313
onBrokenLinks: 'throw',
1414
onBrokenMarkdownLinks: 'warn',
@@ -50,7 +50,7 @@ const config = {
5050
},
5151
announcementBar: {
5252
id: 'announcement-blogpost',
53-
content: `Read the announcement "<strong><a target="_blank" rel="noopener noreferrer" href="/blog/2022/react-native-owl/">We're Building a Visual Regression Testing Library for React Native</a></strong>" in our blog.`,
53+
content: `Read the announcement "<strong><a target="_blank" href="/blog/2022/react-native-owl/">We're Building a Visual Regression Testing Library for React Native</a></strong>" in our blog.`,
5454
isCloseable: false,
5555
},
5656
navbar: {

website/src/components/HomepageFeatures/index.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,26 @@ const FeatureList = [
3333
},
3434
];
3535

36-
export const HomepageFeatures = () => {
37-
return FeatureList.map(({ title, description, imageSource }, idx) => {
38-
return (
39-
<section key={idx} className={styles.feature}>
40-
<h2 className={styles.title}>{title}</h2>
41-
<p className={styles.subtitle}>{description}</p>
36+
export const HomepageFeatures: React.FC = () => {
37+
return (
38+
<>
39+
{FeatureList.map(({ title, description, imageSource }, idx) => {
40+
return (
41+
<section key={idx} className={styles.feature}>
42+
<h2 className={styles.title}>{title}</h2>
43+
<p className={styles.subtitle}>{description}</p>
4244

43-
<div>
44-
{!!imageSource && (
45-
<img
46-
src={`/open-source/react-native-owl${imageSource}`}
47-
className={styles.sectionImageMockup}
48-
/>
49-
)}
50-
</div>
51-
</section>
52-
);
53-
});
45+
<div>
46+
{!!imageSource && (
47+
<img
48+
src={`/open-source/react-native-owl${imageSource}`}
49+
className={styles.sectionImageMockup}
50+
/>
51+
)}
52+
</div>
53+
</section>
54+
);
55+
})}
56+
</>
57+
);
5458
};

website/src/pages/index.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ import Layout from '@theme/Layout';
44
import { Hero } from '../components/Hero';
55
import { HomepageFeatures } from '../components/HomepageFeatures';
66

7+
const META_DESCRIPTION =
8+
'React Native Owl is a visual regression testing library for React Native that enables developers to introduce visual regression tests to their apps for iOS and Android.';
9+
710
export default function Home() {
811
return (
912
<Layout
13+
image="/images/homepage/social.png"
1014
title="Visual Regression Testing"
11-
description="Description will go into a meta tag in <head />"
15+
description={META_DESCRIPTION}
1216
wrapperClassName="homepage"
1317
>
1418
<Hero />
@@ -24,16 +28,15 @@ export default function Home() {
2428
tests locally and on your preferred CI service, seamless.
2529
</p>
2630

27-
{/* REMOVE INITIALLY AS THIS WILL BE DEPLOYED BEFORE THE BLOG IN PUBLISHED
28-
<p>
31+
<p className="intro">
2932
Learn more about the background behind this library in{' '}
30-
<a href="https://formidable.com/blog/" target="_blank">
33+
<a href="/blog/2022/react-native-owl/" target="_blank">
3134
the announcement on the Formidable Blog
3235
</a>
3336
.
34-
</p> */}
37+
</p>
3538

36-
<p>
39+
<p className="intro">
3740
<em>
3841
Note: This library is{' '}
3942
<a href="/docs/introduction/work-in-progress">work-in-progress</a>.

website/static/images/social.png

13.3 KB
Loading

0 commit comments

Comments
 (0)