Skip to content

Commit

Permalink
docs(en): merge reactjs.org into zh-hans (reactjs#232)
Browse files Browse the repository at this point in the history
docs(en): merge reactjs.org into zh-hans
  • Loading branch information
QC-L authored May 18, 2019
2 parents a38bee3 + b0423ba commit 0392da7
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 26 deletions.
30 changes: 15 additions & 15 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### React Finland 2019 {#react-finland-2019}
April 24-26 in Helsinki, Finland

[Website](https://react-finland.fi/) - [Twitter](https://twitter.com/ReactFinland)

### ReactJS Girls Conference {#reactjs-girls-conference}
May 3, 2019 in London, UK

[Website](https://reactjsgirls.com/) - [Twitter](https://twitter.com/reactjsgirls)

### <React.NotAConf /> 2019 {#reactnotaconf--2019}
May 11 in Sofia, Bulgaria

[Website](http://react-not-a-conf.com/) - [Twitter](https://twitter.com/reactnotaconf) - [Facebook](https://www.facebook.com/events/780891358936156)

### ReactEurope 2019 {#reacteurope-2019}
May 23-24, 2019 in Paris, France

Expand Down Expand Up @@ -385,3 +370,18 @@ April 4-5, 2019 in Kraków, Poland
April 12, 2019 in Amsterdam, The Netherlands

[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)

### React Finland 2019 {#react-finland-2019}
April 24-26 in Helsinki, Finland

[Website](https://react-finland.fi/) - [Twitter](https://twitter.com/ReactFinland)

### ReactJS Girls Conference {#reactjs-girls-conference}
May 3, 2019 in London, UK

[Website](https://reactjsgirls.com/) - [Twitter](https://twitter.com/reactjsgirls)

### <React.NotAConf /> 2019 {#reactnotaconf--2019}
May 11 in Sofia, Bulgaria

[Website](http://react-not-a-conf.com/) - [Twitter](https://twitter.com/reactnotaconf) - [Facebook](https://www.facebook.com/events/780891358936156)
4 changes: 2 additions & 2 deletions src/components/MarkdownPage/MarkdownPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TitleAndMetaTags from 'components/TitleAndMetaTags';
import findSectionForPath from 'utils/findSectionForPath';
import toCommaSeparatedList from 'utils/toCommaSeparatedList';
import {sharedStyles} from 'theme';
import createOgUrl from 'utils/createOgUrl';
import createCanonicalUrl from 'utils/createCanonicalUrl';

import type {Node} from 'types';

Expand Down Expand Up @@ -74,7 +74,7 @@ const MarkdownPage = ({
}}>
<TitleAndMetaTags
ogDescription={ogDescription}
ogUrl={createOgUrl(markdownRemark.fields.slug)}
canonicalUrl={createCanonicalUrl(markdownRemark.fields.slug)}
title={`${titlePrefix}${titlePostfix}`}
/>
<div css={{flex: '1 0 auto'}}>
Expand Down
7 changes: 4 additions & 3 deletions src/components/TitleAndMetaTags/TitleAndMetaTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ const defaultDescription = 'A JavaScript library for building user interfaces';
type Props = {
title: string,
ogDescription: string,
ogUrl: string,
canonicalUrl: string,
};

const TitleAndMetaTags = ({title, ogDescription, ogUrl}: Props) => {
const TitleAndMetaTags = ({title, ogDescription, canonicalUrl}: Props) => {
return (
<Helmet title={title}>
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
{ogUrl && <meta property="og:url" content={ogUrl} />}
{canonicalUrl && <meta property="og:url" content={canonicalUrl} />}
<meta property="og:image" content="/logo-og.png" />
<meta
property="og:description"
content={ogDescription || defaultDescription}
/>
<meta property="fb:app_id" content="623268441017527" />
{canonicalUrl && <link rel="canonical" href={canonicalUrl} />}
</Helmet>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/acknowledgements.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Acknowlegements = ({data, location}) => (
<div css={sharedStyles.articleLayout.content}>
<Header>Acknowledgements</Header>
<TitleAndMetaTags
ogUrl={`${urlRoot}/acknowledgements.html`}
canonicalUrl={`${urlRoot}/acknowledgements.html`}
title="React - Acknowledgements"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/blog/all.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AllBlogPosts = ({data, location}: Props) => (
<div css={sharedStyles.articleLayout.content}>
<Header>All Posts</Header>
<TitleAndMetaTags
ogUrl={`${urlRoot}/blog/all.html`}
canonicalUrl={`${urlRoot}/blog/all.html`}
title="React - All Posts"
/>
<ul
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TitleAndMetaTags from 'components/TitleAndMetaTags';
import Layout from 'components/Layout';
import {colors, media, sharedStyles} from 'theme';
import loadScript from 'utils/loadScript';
import createOgUrl from 'utils/createOgUrl';
import createCanonicalUrl from 'utils/createCanonicalUrl';
import {babelURL} from 'site-constants';
import logoWhiteSvg from 'icons/logo-white.svg';

Expand Down Expand Up @@ -51,7 +51,7 @@ class Home extends Component {
<Layout location={location}>
<TitleAndMetaTags
title="React &ndash; 用于构建用户界面的 JavaScript 库"
ogUrl={createOgUrl('index.html')}
canonicalUrl={createCanonicalUrl('/')}
/>
<div css={{width: '100%'}}>
<header
Expand Down
6 changes: 5 additions & 1 deletion src/pages/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Container from 'components/Container';
import Header from 'components/Header';
import TitleAndMetaTags from 'components/TitleAndMetaTags';
import React from 'react';
import {urlRoot} from 'site-constants';
import {media, sharedStyles} from 'theme';

// $FlowFixMe This is a valid path
Expand Down Expand Up @@ -47,7 +48,10 @@ const Languages = ({location}: Props) => (
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
<Header>多语言</Header>
<TitleAndMetaTags title="React - Languages" />
<TitleAndMetaTags
canonicalUrl={`${urlRoot}/languages/`}
title="React - Languages"
/>

<div css={sharedStyles.markdown}>
<p>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Container from 'components/Container';
import Header from 'components/Header';
import TitleAndMetaTags from 'components/TitleAndMetaTags';
import React from 'react';
import {urlRoot} from 'site-constants';
import {sharedStyles} from 'theme';

// $FlowFixMe This is a valid path
Expand All @@ -25,7 +26,10 @@ const Versions = ({location}: Props) => (
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
<Header>React 版本</Header>
<TitleAndMetaTags title="React - Versions" />
<TitleAndMetaTags
canonicalUrl={`${urlRoot}/versions/`}
title="React - Versions"
/>
<div css={sharedStyles.markdown}>
<p>
<a
Expand Down
File renamed without changes.

0 comments on commit 0392da7

Please sign in to comment.