Skip to content

Commit b93d95b

Browse files
docs(v2): Add codesandbox integration (facebook#4062)
1 parent 458bf67 commit b93d95b

5 files changed

Lines changed: 32 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
Docusaurus is a project for building, deploying, and maintaining open source project websites easily.
2727

28-
Try Docusaurus on **CodeSandbox** immediately with [new.docusaurus.io](http://new.docusaurus.io/)
28+
Use **[new.docusaurus.io](https://new.docusaurus.io)** to test Docusaurus immediately in CodeSandbox.
2929

3030
- **Simple to Start**
3131

website/docs/installation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ title: Installation
55

66
Docusaurus is essentially a set of npm [packages](https://github.com/facebook/docusaurus/tree/master/packages) that can be installed over npm.
77

8+
:::tip
9+
10+
Use **[new.docusaurus.io](https://new.docusaurus.io)** to test Docusaurus immediately in CodeSandbox.
11+
12+
:::
13+
814
## Requirements
915

1016
- [Node.js](https://nodejs.org/en/download/) version >= 10.15.1 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed

website/docs/introduction.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ Most users are already using v2 ([trends](https://www.npmtrends.com/docusaurus-v
2020
- :white_check_mark: You want the full power of React and MDX
2121
- :white_check_mark: You do not need support for IE11
2222

23+
:::tip
24+
25+
Use **[new.docusaurus.io](https://new.docusaurus.io)** to test Docusaurus immediately in CodeSandbox.
26+
27+
:::
28+
2329
**Use [Docusaurus v1](https://docusaurus.io/) if:**
2430

2531
- :x: You don't want a single-page application (SPA)

website/src/pages/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ function Home() {
114114
to={useBaseUrl('docs/')}>
115115
<Translate>Get Started</Translate>
116116
</Link>
117+
<Link
118+
className={styles.indexCtaTryNowButton}
119+
to="https://new.docusaurus.io">
120+
<Translate>Playground</Translate>
121+
</Link>
117122
<span className={styles.indexCtasGitHubButtonWrapper}>
118123
<iframe
119124
className={styles.indexCtasGitHubButton}

website/src/pages/styles.module.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,23 @@
122122

123123
.indexCtasGitHubButton {
124124
border: none;
125-
margin-left: 24px;
126125
overflow: hidden;
127126
}
128127

128+
.indexCtaTryNowButton {
129+
line-height: 1.2em;
130+
text-decoration: underline;
131+
text-transform: uppercase;
132+
transition: background 0.3s, color 0.3s;
133+
color: #fff;
134+
font-size: 14px;
135+
font-weight: bold;
136+
margin: 0 36px;
137+
}
138+
.indexCtaTryNowButton:hover {
139+
color: var(--ifm-color-primary);
140+
}
141+
129142
@media only screen and (max-width: 768px) {
130143
.hero {
131144
padding-left: 20px;

0 commit comments

Comments
 (0)