Skip to content

Commit 4a9706e

Browse files
committed
Add links and seo
1 parent 54f7def commit 4a9706e

File tree

9 files changed

+78
-15
lines changed

9 files changed

+78
-15
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ console.log(3);
395395
## Examples
396396

397397
- [React Conf 2018 Hooks Demo](https://github.com/pomber/react-conf-2018-hooks-demo)
398+
- [Formidable's GraphQL Workshop](https://advanced-graphql-workshop.netlify.com/) by [Phil Pluckthun](https://twitter.com/_philpl)
398399

399400
## Related
400401

sites/docs/gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
plugins: ["gatsby-theme-mdx-deck"]
2+
plugins: ["gatsby-theme-mdx-deck", "gatsby-plugin-react-helmet"]
33
};

sites/docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
"dependencies": {
77
"code-surfer": "3.0.0-beta.1",
88
"gatsby": "^2.15.28",
9+
"gatsby-plugin-react-helmet": "^3.1.15",
910
"gatsby-theme-mdx-deck": "^3.0.13",
1011
"prism-react-renderer": "^1.0.2",
1112
"react": "^16.10.0",
1213
"react-dom": "^16.10.0",
14+
"react-helmet": "^5.2.1",
1315
"react-vista": "^0.1.1"
1416
},
1517
"scripts": {

sites/docs/src/home/app.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,29 @@ import "./index.css";
33
import Stage from "./stage";
44
import Deck from "./deck";
55
import Docs from "./docs";
6+
import { Helmet } from "react-helmet";
7+
8+
const card = "https://codesurfer.pomb.us/card.png";
69

710
function App() {
811
return (
9-
<Stage deck={<Deck />}>
10-
<Docs />
11-
</Stage>
12+
<React.Fragment>
13+
<Helmet>
14+
<meta charSet="utf-8" />
15+
<title>Code Surfer - Rad Code Slides</title>
16+
<meta
17+
name="description"
18+
content="Code Surfer adds code highlighting, code zooming, code scrolling, code focusing, code morphing, and fun to MDX Deck slides."
19+
/>
20+
<meta name="image" content={card} />
21+
<meta property="og:image" content={card} />
22+
<meta name="twitter:card" content="summary_large_image" />
23+
<meta name="twitter:creator" content="@pomber" />
24+
</Helmet>
25+
<Stage deck={<Deck />}>
26+
<Docs />
27+
</Stage>
28+
</React.Fragment>
1229
);
1330
}
1431

sites/docs/src/home/docs.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,34 @@ import Readme from "./readme.mdx";
33
import { MDXProvider } from "@mdx-js/react";
44
import CodeBlock from "./code-block";
55

6-
const components = { pre: props => <div {...props} />, code: CodeBlock };
6+
const components = {
7+
pre: props => <div {...props} />,
8+
code: CodeBlock,
9+
blockquote: props => (
10+
<blockquote
11+
{...props}
12+
style={{
13+
borderLeft: "3px solid #999",
14+
marginLeft: "20px",
15+
paddingLeft: "10px"
16+
}}
17+
/>
18+
),
19+
h1: props => <H as="h1" {...props} />,
20+
h2: props => <H as="h2" {...props} />,
21+
h3: props => <H as="h3" {...props} />
22+
};
23+
24+
function H(props) {
25+
const text = props.children;
26+
const id =
27+
text &&
28+
text
29+
.split(" ")
30+
.join("-")
31+
.toLowerCase();
32+
return React.createElement(props.as, { ...props, id });
33+
}
734

835
export default function Docs() {
936
return (

sites/docs/src/home/readme.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Code Surfer
2-
3-
> Help to keep this project alive with your [support](https://opencollective.com/code-surfer) ❤️
4-
51
Code Surfer adds code highlighting, code zooming, code scrolling, code focusing, code morphing, and fun to [MDX Deck](https://github.com/jxnblk/mdx-deck) slides.
62

73
To create a new project run:
@@ -387,6 +383,7 @@ console.log(3);
387383
## Examples
388384

389385
- [React Conf 2018 Hooks Demo](https://github.com/pomber/react-conf-2018-hooks-demo)
386+
- [Formidable's GraphQL Workshop](https://advanced-graphql-workshop.netlify.com/) by [Phil Pluckthun](https://twitter.com/_philpl)
390387

391388
## Related
392389

sites/docs/src/home/stage.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@ import {
1313
Plane,
1414
Roof,
1515
Floor,
16-
LWall,
17-
RWall,
18-
RotateX,
1916
RotateY,
20-
RotateZ,
2117
Move,
2218
useScale,
23-
FabricTexture,
2419
SpotLight,
2520
NoLights,
2621
PointLight
@@ -32,7 +27,7 @@ const dividerTexture = `url("${brightSquares}")`;
3227
export default function Stage({ children, deck }) {
3328
const [vw, vh] = useWindowSize();
3429
if (!vw) return null;
35-
const h = Math.max((vw / vh < 1.12 ? vw / 1.12 : vh) * 0.75, 330);
30+
const h = Math.max((vw / vh < 1.16 ? vw / 1.16 : vh) * 0.75, 330);
3631
const scale = h * 0.2;
3732
const yMiddle = 0.33;
3833
const yOrigin = (0.6 * h) / vh;

sites/docs/static/card.png

136 KB
Loading

yarn.lock

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,13 @@
893893
dependencies:
894894
regenerator-runtime "^0.13.2"
895895

896+
"@babel/runtime@^7.7.2":
897+
version "7.7.4"
898+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.4.tgz#b23a856751e4bf099262f867767889c0e3fe175b"
899+
integrity sha512-r24eVUUr0QqNZa+qrImUk8fn5SPhHq+IfYvIoIMg0do3GdK9sMdiLKP3GYVVaxpPKORgm8KRKaNTEhAjgIpLMw==
900+
dependencies:
901+
regenerator-runtime "^0.13.2"
902+
896903
"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0":
897904
version "7.6.0"
898905
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6"
@@ -6748,6 +6755,13 @@ gatsby-plugin-react-helmet@^3.1.0:
67486755
dependencies:
67496756
"@babel/runtime" "^7.6.2"
67506757

6758+
gatsby-plugin-react-helmet@^3.1.15:
6759+
version "3.1.15"
6760+
resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.1.15.tgz#0f81ec0106e86ac2d44cb714a79a3a928e5c40a6"
6761+
integrity sha512-VrPv3rD/YrYN7lZsRX7YpFO8qj2uZj0iHvhNEeg2+iEVI2GTegK5wlRut85bnlR/ezpeuzm7v4qhCx2mgeYEKw==
6762+
dependencies:
6763+
"@babel/runtime" "^7.7.2"
6764+
67516765
gatsby-plugin-theme-ui@^0.2.6:
67526766
version "0.2.43"
67536767
resolved "https://registry.yarnpkg.com/gatsby-plugin-theme-ui/-/gatsby-plugin-theme-ui-0.2.43.tgz#a2baa2bdba1bd923edeb63f1ebdf48c36b5c63ef"
@@ -12453,6 +12467,16 @@ react-helmet-async@^1.0.2:
1245312467
react-fast-compare "2.0.4"
1245412468
shallowequal "1.1.0"
1245512469

12470+
react-helmet@^5.2.1:
12471+
version "5.2.1"
12472+
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.1.tgz#16a7192fdd09951f8e0fe22ffccbf9bb3e591ffa"
12473+
integrity sha512-CnwD822LU8NDBnjCpZ4ySh8L6HYyngViTZLfBBb3NjtrpN8m49clH8hidHouq20I51Y6TpCTISCBbqiY5GamwA==
12474+
dependencies:
12475+
object-assign "^4.1.1"
12476+
prop-types "^15.5.4"
12477+
react-fast-compare "^2.0.2"
12478+
react-side-effect "^1.1.0"
12479+
1245612480
react-helmet@^6.0.0-beta:
1245712481
version "6.0.0-beta"
1245812482
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.0.0-beta.tgz#1f2ac04521951486e4fce3296d0c88aae8cabd5c"

0 commit comments

Comments
 (0)