Skip to content

Commit

Permalink
better doc integration of CodeSandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jan 19, 2021
1 parent a8e063d commit b99c422
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
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
9 changes: 6 additions & 3 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 All @@ -26,9 +32,6 @@ npx @docusaurus/init@latest init my-website classic

If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.

:::tip You can easily bootstrap your documentation with Docusaurus on Codesandbox via this [link](https://new.docusaurus.io)
:::

**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:

```bash
Expand Down
9 changes: 6 additions & 3 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 Expand Up @@ -96,9 +102,6 @@ Jekyll is one of the most mature static site generators around and has been a gr

In comparison with statically generated HTML and interactivity added using `<script />` tags, Docusaurus sites are React apps. Using modern JavaScript ecosystem tooling, we hope to set new standards on doc sites performance, asset build pipeline and optimizations, and ease to setup.

:::tip You can easily bootstrap your documentation with Docusaurus on Codesandbox via this [link](https://new.docusaurus.io)
:::

### VuePress

VuePress has many similarities with Docusaurus - both focus heavily on content-centric website and provides tailored documentation features out of the box. However, VuePress is powered by Vue, while Docusaurus is powered by React. If you want a Vue-based solution, VuePress would be a decent choice.
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

1 comment on commit b99c422

@sammychinedu2ky
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

Please sign in to comment.