website: upgrade to docusaurus 2beta3

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-07-13 12:46:29 +02:00
parent b7835a751b
commit cd0a6f2d7c
4 changed files with 3766 additions and 3343 deletions

7074
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,8 +12,8 @@
"serve": "docusaurus serve"
},
"dependencies": {
"@docusaurus/plugin-client-redirects": "*",
"@docusaurus/preset-classic": "2.0.0-beta.0",
"@docusaurus/plugin-client-redirects": "2.0.0-beta.3",
"@docusaurus/preset-classic": "2.0.0-beta.3",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"postcss": "^8.3.5",

View File

@ -2,23 +2,28 @@ import React from "react";
import Layout from "@theme/Layout";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import useBaseUrl from "@docusaurus/useBaseUrl";
import BrowserOnly from "@docusaurus/core/lib/client/exports/BrowserOnly";
function APIBrowser() {
const context = useDocusaurusContext();
const { siteConfig = {} } = context;
import('rapidoc');
return (
<Layout title="API Browser" description={siteConfig.tagline}>
<rapi-doc
spec-url={useBaseUrl("schema.yaml")}
allow-try="false"
show-header="false"
theme="dark"
render-style="view"
primary-color="#fd4b2d"
allow-spec-url-load="false"
allow-spec-file-load="false">
</rapi-doc>
<BrowserOnly>
{() => {
import('rapidoc');
return <rapi-doc
spec-url={useBaseUrl("schema.yaml")}
allow-try="false"
show-header="false"
theme="dark"
render-style="view"
primary-color="#fd4b2d"
allow-spec-url-load="false"
allow-spec-file-load="false">
</rapi-doc>
}}
</BrowserOnly>
</Layout>
);
}

View File

@ -105,7 +105,7 @@ function Home() {
<div>
<BrowserOnly>
{() => {
const ReactBeforeSliderComponent = require('react-before-after-slider-component').default;
const ReactBeforeSliderComponent = require('react-before-after-slider-component');
return <ReactBeforeSliderComponent
firstImage={{
id: 1,
@ -150,7 +150,7 @@ function Home() {
<div>
<BrowserOnly>
{() => {
const ReactBeforeSliderComponent = require('react-before-after-slider-component').default;
const ReactBeforeSliderComponent = require('react-before-after-slider-component');
return <ReactBeforeSliderComponent
firstImage={{
id: 1,