Move from gitbook to docusaurus, build docs in Travis CI (#10970)
* fix: ignore unknown fields in more RPC responses * Remove mdbook infrastructure * Delete gitattributes and other theme related items Move all docs to /docs folder to support Docusaurus * all docs need to be moved to /docs * can be changed in the future Add Docusaurus infrastructure * initialize docusaurus repo Remove trailing whitespace, add support for eslint Change Docusaurus configuration to support `src` * No need to rename the folder! Change a setting and we're all good to go. * Fixing rebase items * Remove unneccessary markdown file, fix type * Some fonts are hard to read. Others, not so much. Rubik, you've been sidelined. Roboto, into the limelight! * As much as we all love tutorials, I think we all can navigate around a markdown file. Say goodbye, `mdx.md`. * Setup deployment infrastructure * Move docs job from buildkite to travic * Fix travis config * Add vercel token to travis config * Only deploy docs after merge * Docker rust env * Revert "Docker rust env" This reverts commit f84bc208e807aab1c0d97c7588bbfada1fedfa7c. * Build CLI usage from docker * Pacify shellcheck * Run job on PR and new commits for publication * Update README * Fix svg image building * shellcheck Co-authored-by: Michael Vines <mvines@gmail.com> Co-authored-by: Ryan Shea <rmshea@users.noreply.github.com> Co-authored-by: publish-docs.sh <maintainers@solana.com>
This commit is contained in:
133
docs/src/pages/index.js
Normal file
133
docs/src/pages/index.js
Normal file
@@ -0,0 +1,133 @@
|
||||
import React from "react";
|
||||
import clsx from "clsx";
|
||||
import Layout from "@theme/Layout";
|
||||
import Link from "@docusaurus/Link";
|
||||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import styles from "./styles.module.css";
|
||||
|
||||
const features = [
|
||||
{
|
||||
title: <>Run a Validator</>,
|
||||
imageUrl: "docs/running-validator/README",
|
||||
description: <>Learn how to start a validator on the Solana cluster.</>,
|
||||
},
|
||||
{
|
||||
title: <>Launch an Application</>,
|
||||
imageUrl: "docs/apps/README",
|
||||
description: <>Build superfast applications with one API.</>,
|
||||
},
|
||||
{
|
||||
title: <>Participate in Tour de SOL</>,
|
||||
imageUrl: "docs/tour-de-sol/README",
|
||||
description: (
|
||||
<>
|
||||
Participate in our incentivised testnet and earn rewards by finding
|
||||
bugs.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <>Integrate the SOL token into your Exchange</>,
|
||||
imageUrl: "docs/integrations/exchange",
|
||||
description: (
|
||||
<>
|
||||
Follow our extensive integration guide to ensure a seamless user
|
||||
experience.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <>Create or Configure a Solana Wallet</>,
|
||||
imageUrl: "docs/wallet-guide/README",
|
||||
description: (
|
||||
<>
|
||||
Whether you need to create a wallet, check the balance of your funds, or
|
||||
take a look at what's out there for housing SOL tokens, start here.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <>Learn About Solana's Architecture</>,
|
||||
imageUrl: "docs/cluster/README",
|
||||
description: (
|
||||
<>
|
||||
Familiarize yourself with the high level architecture of a Solana
|
||||
cluster.
|
||||
</>
|
||||
),
|
||||
}, //
|
||||
// {
|
||||
// title: <>Understand Our Economic Design</>,
|
||||
// imageUrl: "docs/implemented-proposals/ed_overview/README",
|
||||
// description: (
|
||||
// <>
|
||||
// Solana's Economic Design provides a scalable blueprint for long term
|
||||
// economic development and prosperity.
|
||||
// </>
|
||||
// ),
|
||||
// }
|
||||
];
|
||||
|
||||
function Feature({ imageUrl, title, description }) {
|
||||
const imgUrl = useBaseUrl(imageUrl);
|
||||
return (
|
||||
<div className={clsx("col col--4", styles.feature)}>
|
||||
{imgUrl && (
|
||||
<Link className="navbar__link" to={imgUrl}>
|
||||
<div className="card">
|
||||
<div className="card__header">
|
||||
<h3>{title}</h3>
|
||||
</div>
|
||||
<div className="card__body">
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Home() {
|
||||
const context = useDocusaurusContext();
|
||||
const { siteConfig = {} } = context;
|
||||
return (
|
||||
<Layout
|
||||
title="Homepage"
|
||||
description="Description will go into a meta tag in <head />"
|
||||
>
|
||||
{/* <header className={clsx("hero hero--primary", styles.heroBanner)}> */}
|
||||
{/* <div className="container">
|
||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p> */}
|
||||
{/* <div className={styles.buttons}>
|
||||
<Link
|
||||
className={clsx(
|
||||
'button button--outline button--secondary button--lg',
|
||||
styles.getStarted,
|
||||
)}
|
||||
to={useBaseUrl('docs/')}>
|
||||
Get Started
|
||||
</Link>
|
||||
</div> */}
|
||||
{/* </div> */}
|
||||
{/* </header> */}
|
||||
<main>
|
||||
{features && features.length > 0 && (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row cards__container">
|
||||
{features.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export default Home;
|
37
docs/src/pages/styles.module.css
Normal file
37
docs/src/pages/styles.module.css
Normal file
@@ -0,0 +1,37 @@
|
||||
/* stylelint-disable docusaurus/copyright-header */
|
||||
|
||||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 966px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureImage {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
Reference in New Issue
Block a user