$ yarn add @docusaurus/mdx-loader
$ yarn add swagger-ui-react
Last active
October 22, 2020 03:07
-
-
Save edgars/d1c01bd44fb5868089f8b50bcfe6c934 to your computer and use it in GitHub Desktop.
post_docusaurus
my-website
├── blog
│ ├── 2019-05-28-hola.md
│ ├── 2019-05-29-hello-world.md
│ └── 2020-05-30-welcome.md
├── docs
│ ├── doc1.md
│ ├── doc2.md
│ ├── doc3.md
│ └── mdx.md
├── src
│ ├── css
│ │ └── custom.css
│ └── pages
│ ├── styles.module.css
│ └── index.js
├── static
│ └── img
├── docusaurus.config.js
├── package.json
├── README.md
├── sidebars.js
└── yarn.lock
npx @docusaurus/init@next init mydevportal classic
npm run start
✔ Client
Compiled successfully in 8.25s
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/edgar/Documents/DEV-2/2020/customers/cloud-day/mydevportal
ℹ 「wds」: 404s will fallback to /index.html
✔ Client
Compiled successfully in 94.08ms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwaggerUI from "swagger-ui-react" | |
import "swagger-ui-react/swagger-ui.css" | |
--- | |
id: swagger | |
title: Swagger | |
--- | |
You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/). | |
<SwaggerUI url="https://petstore.swagger.io/v2/swagger.json"/> | |
export const Highlight = ({children, color}) => ( <span style={{ | |
backgroundColor: color, | |
borderRadius: '2px', | |
color: '#fff', | |
padding: '0.2rem', | |
}}>{children}</span> ); | |
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors. | |
I can write **Markdown** alongside my _JSX_! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment