-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
238 additions
and
117 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
This file was deleted.
Oops, something went wrong.
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,105 @@ | ||
import React from 'react'; | ||
import Layout from '@theme/Layout'; | ||
import Link from '@docusaurus/Link'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
import clsx from 'clsx'; | ||
import styles from './styles.module.css'; | ||
|
||
const sections = [ | ||
{ | ||
title: <>Using ApiDoc Component</>, | ||
link: '/examples/custom-page/', | ||
description: ( | ||
<> | ||
A page using ApiDoc component in{' '} | ||
<a href="https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-theme-redoc"> | ||
docusaurus-theme-redoc | ||
</a> | ||
</> | ||
), | ||
}, | ||
{ | ||
title: <>Using Redoc Component</>, | ||
link: '/examples/custom-layout/', | ||
description: ( | ||
<> | ||
A page with custom Layout using Redoc component in{' '} | ||
<a href="https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-theme-redoc"> | ||
docusaurus-theme-redoc | ||
</a> | ||
</> | ||
), | ||
}, | ||
{ | ||
title: <>Using Spec URL</>, | ||
link: '/examples/using-remote-url/', | ||
description: ( | ||
<> | ||
A page made automatically with{' '} | ||
<a href="https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-plugin-redoc"> | ||
docusaurus-plugin-redoc | ||
</a> | ||
</> | ||
), | ||
}, | ||
{ | ||
title: <>Using YAML Spec</>, | ||
link: '/examples/using-single-yaml/', | ||
description: ( | ||
<> | ||
A build time rendered page (no loading indicator on refresh), made | ||
automatically with{' '} | ||
<a href="https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-plugin-redoc"> | ||
docusaurus-plugin-redoc | ||
</a> | ||
</> | ||
), | ||
}, | ||
]; | ||
|
||
/** | ||
* | ||
* @param {{ | ||
* title: string | React.ReactNode; | ||
* description: string | React.ReactNode; | ||
* link?: string; | ||
* }} param0 | ||
*/ | ||
function Section({ title, description, link }) { | ||
const sectionComponent = <h3>{title}</h3>; | ||
const fullLink = useBaseUrl(link); | ||
return ( | ||
<div className={clsx('col col--6', styles.feature, styles.featuresCol)}> | ||
{link ? <Link to={fullLink}>{sectionComponent}</Link> : sectionComponent} | ||
<p>{description}</p> | ||
</div> | ||
); | ||
} | ||
|
||
function Docs() { | ||
return ( | ||
<Layout title="Redocusaurus Example" description="With different use-cases"> | ||
<header className={clsx('hero hero--primary', styles.heroBanner)}> | ||
<div className="container"> | ||
<h1 className="hero__title">Redocusaurus Example</h1> | ||
<p>Redoc for Docusaurus with Dark Mode Support</p> | ||
</div> | ||
</header> | ||
<main> | ||
{sections && sections.length > 0 && ( | ||
<section className={styles.features}> | ||
<div className="container"> | ||
<div className="row"> | ||
{sections.map((props, idx) => ( | ||
<Section key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
)} | ||
</main> | ||
</Layout> | ||
); | ||
} | ||
|
||
export default Docs; |
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 was deleted.
Oops, something went wrong.
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,100 @@ | ||
import React from 'react'; | ||
import Layout from '@theme/Layout'; | ||
import Link from '@docusaurus/Link'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
import clsx from 'clsx'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
|
||
|
||
const sections = [ | ||
{ | ||
title: <>🌚 Dark Mode Support</>, | ||
description: ( | ||
<>Inbuilt support for Docusaurus Classic Theme's Dark Mode!</> | ||
), | ||
}, | ||
{ | ||
title: <>🧩 Customizable</>, | ||
description: ( | ||
<> | ||
Pass in your custom theme colors or options and it will be merged. All | ||
components can be swizzled to suit your needs (with Typescript support) | ||
</> | ||
), | ||
}, | ||
{ | ||
title: <>📑 Schema Definitions</>, | ||
description: ( | ||
<>Use individual schema definitions directly in your MDX docs</> | ||
), | ||
}, | ||
{ | ||
title: <>⚡️ Blazing Fast</>, | ||
description: ( | ||
<> | ||
Support for | ||
<a href="/docs/guides/build-time-rendering"> | ||
{' '} | ||
Build Time Rendering! | ||
</a> | ||
</> | ||
), | ||
}, | ||
]; | ||
|
||
/** | ||
* | ||
* @param {{ | ||
* title: string | React.ReactNode; | ||
* description: string | React.ReactNode; | ||
* link?: string; | ||
* }} param0 | ||
*/ | ||
function Section({ title, description, link }) { | ||
const sectionComponent = <h3>{title}</h3>; | ||
const fullLink = useBaseUrl(link); | ||
return ( | ||
<div className={clsx('col col--6', styles.feature, styles.featuresCol)}> | ||
{link ? <Link to={fullLink}>{sectionComponent}</Link> : sectionComponent} | ||
<p>{description}</p> | ||
</div> | ||
); | ||
} | ||
|
||
function Docs() { | ||
return ( | ||
<Layout title="Redocusaurus" description="OpenAPI documentation solution"> | ||
<header className={clsx('hero hero--primary', styles.heroBanner)}> | ||
<div className="container"> | ||
<h1 className="hero__title">Redocusaurus</h1> | ||
<p>OpenAPI solution for Docusaurus docs using Redoc</p> | ||
<span> | ||
<iframe | ||
src="https://ghbtns.com/github-btn.html?user=rohit-gohri&repo=redocusaurus&type=star&count=true&size=large" | ||
width={160} | ||
height={30} | ||
title="GitHub Stars" | ||
/> | ||
</span> | ||
</div> | ||
</header> | ||
<main> | ||
{sections && sections.length > 0 && ( | ||
<section className={styles.features}> | ||
<div className="container"> | ||
<div className="row"> | ||
{sections.map((props, idx) => ( | ||
<Section key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
)} | ||
</main> | ||
</Layout> | ||
); | ||
} | ||
|
||
export default Docs; |
Oops, something went wrong.