yhuard / docusaurus-stoplight-elements

Run @stoplight/elements within Docusaurus 2

Home Page:https://docusaurus-stoplight-elements.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docusaurus + Stoplight Elements

This repo showcases how to use Stoplight Elements with Docusaurus 2.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Compilation issue with Ubuntu

While it's possible to build (yarn build) the website at the commit https://github.com/yhuard/docusaurus-stoplight-elements/commit/f55eebb0db6e462d81dd8ed3e241250c45215a15 with macOS, the same is not true for Ubuntu, as discussed here. To avoid this problem, we can lazy-load @stoplight/elements, as done in https://github.com/yhuard/docusaurus-stoplight-elements/commit/ba545f99aa420c3ba25450b4e5cf4625d9d33ce3.

About

Run @stoplight/elements within Docusaurus 2

https://docusaurus-stoplight-elements.vercel.app/


Languages

Language:JavaScript 39.6%Language:TypeScript 33.8%Language:CSS 13.6%Language:SCSS 10.3%Language:Dockerfile 2.6%