Skip to content

Commit 6eef46d

Browse files
committed
Renamed 'examples' folder to 'codepen' for clarity
1 parent 56735c4 commit 6eef46d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed
File renamed without changes.
File renamed without changes.

content/docs/hello-world.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ redirect_from:
1212
- "docs/getting-started-zh-CN.html"
1313
---
1414

15-
The easiest way to get started with React is to use <a href="/examples/hello-world" target="_blank">this Hello World example code on CodePen</a>. You don't need to install anything; you can just open it in another tab and follow along as we go through examples. If you'd rather use a local development environment, check out the [Installation](/docs/installation.html) page.
15+
The easiest way to get started with React is to use <a href="/codepen/hello-world" target="_blank">this Hello World example code on CodePen</a>. You don't need to install anything; you can just open it in another tab and follow along as we go through examples. If you'd rather use a local development environment, check out the [Installation](/docs/installation.html) page.
1616

1717
The smallest React example looks like this:
1818

content/docs/introducing-jsx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ReactDOM.render(
4646
);
4747
```
4848

49-
<a href="/examples/introducing-jsx" target="_blank">Try it on CodePen.</a>
49+
<a href="/codepen/introducing-jsx" target="_blank">Try it on CodePen.</a>
5050

5151
We split JSX over multiple lines for readability. While it isn't required, when doing this, we also recommend wrapping it in parentheses to avoid the pitfalls of [automatic semicolon insertion](http://stackoverflow.com/q/2846283).
5252

gatsby-node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ exports.createPages = async ({graphql, boundActionCreators}) => {
170170
// Create Codepen redirects.
171171
// These use the Codepen prefill API to JIT-create Pens.
172172
// https://blog.codepen.io/documentation/api/prefill/
173-
readdirSync('./examples').forEach(file => {
173+
readdirSync('./codepen').forEach(file => {
174174
const slug = file.substring(0, file.length - 3); // Trim extension
175-
const code = readFileSync(`./examples/${file}`, 'utf8');
175+
const code = readFileSync(`./codepen/${file}`, 'utf8');
176176

177177
createPage({
178-
path: `/examples/${slug}`,
178+
path: `/codepen/${slug}`,
179179
component: resolve('./src/templates/codepen-example.js'),
180180
context: {
181181
code,

0 commit comments

Comments
 (0)