This repository has been archived by the owner on Mar 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate @stoplight/elements into Docusaurus
- Loading branch information
Showing
7 changed files
with
2,250 additions
and
84 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Exclude everything | ||
* | ||
|
||
# Only add what is necessary | ||
!babel.config.js | ||
!docusaurus.config.js | ||
!package.json | ||
!sidebars.js | ||
!tsconfig.json | ||
!yarn.lock | ||
!blog | ||
!docs | ||
!src | ||
!static |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:16.13.2-alpine3.15 | ||
WORKDIR /usr/src/app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --frozen-lockfile --silent && yarn cache clean | ||
COPY babel.config.js docusaurus.config.js sidebars.js tsconfig.json ./ | ||
COPY blog blog | ||
COPY docs docs | ||
COPY src src | ||
COPY static static | ||
RUN yarn build | ||
EXPOSE 3000 | ||
CMD ["yarn", "serve"] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: "3.7" | ||
|
||
services: | ||
docusaurus-stoplight-elements: | ||
build: . | ||
ports: | ||
- "3000:3000" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import Layout from "@theme/Layout"; | ||
import "@stoplight/elements/styles.min.css"; | ||
import { API } from "@stoplight/elements"; | ||
import BrowserOnly from "@docusaurus/BrowserOnly"; | ||
|
||
export default function Api() { | ||
return ( | ||
<Layout title="API example"> | ||
<BrowserOnly> | ||
{() => ( | ||
<API | ||
apiDescriptionUrl="https://api.apis.guru/v2/specs/github.com/1.1.4/openapi.yaml" | ||
router="hash" | ||
/> | ||
)} | ||
</BrowserOnly> | ||
</Layout> | ||
); | ||
} |
Oops, something went wrong.