website: upgrade to docusaurus 2beta3
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
b7835a751b
commit
cd0a6f2d7c
File diff suppressed because it is too large
Load Diff
|
@ -12,8 +12,8 @@
|
||||||
"serve": "docusaurus serve"
|
"serve": "docusaurus serve"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/plugin-client-redirects": "*",
|
"@docusaurus/plugin-client-redirects": "2.0.0-beta.3",
|
||||||
"@docusaurus/preset-classic": "2.0.0-beta.0",
|
"@docusaurus/preset-classic": "2.0.0-beta.3",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^1.1.1",
|
"clsx": "^1.1.1",
|
||||||
"postcss": "^8.3.5",
|
"postcss": "^8.3.5",
|
||||||
|
|
|
@ -2,23 +2,28 @@ import React from "react";
|
||||||
import Layout from "@theme/Layout";
|
import Layout from "@theme/Layout";
|
||||||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||||
|
import BrowserOnly from "@docusaurus/core/lib/client/exports/BrowserOnly";
|
||||||
|
|
||||||
function APIBrowser() {
|
function APIBrowser() {
|
||||||
const context = useDocusaurusContext();
|
const context = useDocusaurusContext();
|
||||||
const { siteConfig = {} } = context;
|
const { siteConfig = {} } = context;
|
||||||
import('rapidoc');
|
|
||||||
return (
|
return (
|
||||||
<Layout title="API Browser" description={siteConfig.tagline}>
|
<Layout title="API Browser" description={siteConfig.tagline}>
|
||||||
<rapi-doc
|
<BrowserOnly>
|
||||||
spec-url={useBaseUrl("schema.yaml")}
|
{() => {
|
||||||
allow-try="false"
|
import('rapidoc');
|
||||||
show-header="false"
|
return <rapi-doc
|
||||||
theme="dark"
|
spec-url={useBaseUrl("schema.yaml")}
|
||||||
render-style="view"
|
allow-try="false"
|
||||||
primary-color="#fd4b2d"
|
show-header="false"
|
||||||
allow-spec-url-load="false"
|
theme="dark"
|
||||||
allow-spec-file-load="false">
|
render-style="view"
|
||||||
</rapi-doc>
|
primary-color="#fd4b2d"
|
||||||
|
allow-spec-url-load="false"
|
||||||
|
allow-spec-file-load="false">
|
||||||
|
</rapi-doc>
|
||||||
|
}}
|
||||||
|
</BrowserOnly>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ function Home() {
|
||||||
<div>
|
<div>
|
||||||
<BrowserOnly>
|
<BrowserOnly>
|
||||||
{() => {
|
{() => {
|
||||||
const ReactBeforeSliderComponent = require('react-before-after-slider-component').default;
|
const ReactBeforeSliderComponent = require('react-before-after-slider-component');
|
||||||
return <ReactBeforeSliderComponent
|
return <ReactBeforeSliderComponent
|
||||||
firstImage={{
|
firstImage={{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
@ -150,7 +150,7 @@ function Home() {
|
||||||
<div>
|
<div>
|
||||||
<BrowserOnly>
|
<BrowserOnly>
|
||||||
{() => {
|
{() => {
|
||||||
const ReactBeforeSliderComponent = require('react-before-after-slider-component').default;
|
const ReactBeforeSliderComponent = require('react-before-after-slider-component');
|
||||||
return <ReactBeforeSliderComponent
|
return <ReactBeforeSliderComponent
|
||||||
firstImage={{
|
firstImage={{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|
Reference in New Issue