Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v2): Add codesandbox integration #4062

Merged
merged 2 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

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

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

- **Simple to Start**

Expand Down
6 changes: 6 additions & 0 deletions website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ title: Installation

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

:::tip

Use **[new.docusaurus.io](https://new.docusaurus.io)** to test Docusaurus immediately in CodeSandbox.

:::

## Requirements

- [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
Expand Down
6 changes: 6 additions & 0 deletions website/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ Most users are already using v2 ([trends](https://www.npmtrends.com/docusaurus-v
- :white_check_mark: You want the full power of React and MDX
- :white_check_mark: You do not need support for IE11

:::tip

Use **[new.docusaurus.io](https://new.docusaurus.io)** to test Docusaurus immediately in CodeSandbox.

:::

**Use [Docusaurus v1](https://docusaurus.io/) if:**

- :x: You don't want a single-page application (SPA)
Expand Down
5 changes: 5 additions & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ function Home() {
to={useBaseUrl('docs/')}>
<Translate>Get Started</Translate>
</Link>
<Link
className={styles.indexCtaTryNowButton}
to="https://new.docusaurus.io">
<Translate>Playground</Translate>
</Link>
<span className={styles.indexCtasGitHubButtonWrapper}>
<iframe
className={styles.indexCtasGitHubButton}
Expand Down
15 changes: 14 additions & 1 deletion website/src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,23 @@

.indexCtasGitHubButton {
border: none;
margin-left: 24px;
overflow: hidden;
}

.indexCtaTryNowButton {
line-height: 1.2em;
text-decoration: underline;
text-transform: uppercase;
transition: background 0.3s, color 0.3s;
color: #fff;
font-size: 14px;
font-weight: bold;
margin: 0 36px;
}
.indexCtaTryNowButton:hover {
color: var(--ifm-color-primary);
}

@media only screen and (max-width: 768px) {
.hero {
padding-left: 20px;
Expand Down