Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Add Docusaurus infrastructure
Browse files Browse the repository at this point in the history
* initialize docusaurus repo
  • Loading branch information
rmshea committed Jun 29, 2020
1 parent 1904639 commit 1879b53
Show file tree
Hide file tree
Showing 27 changed files with 24,480 additions and 232 deletions.
22 changes: 22 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vercel
38 changes: 16 additions & 22 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
Building the Solana Docs
---

Install dependencies, build, and test the docs:

```bash
$ brew install coreutils
$ brew install mscgen
$ cargo install svgbob_cli
$ cargo install mdbook-linkcheck
$ cargo install mdbook
$ ./build.sh
```
# Docs Readme

Solana's Docs are built using [Docusaurus 2](https://v2.docusaurus.io/).

Run any Rust tests in the markdown:
### Installation

```bash
$ make test
```
$ yarn
```

Render markdown as HTML:
### Local Development

```bash
$ make build
```
$ yarn start
```

Render and view the docs:
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

```bash
$ make open
### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
112 changes: 112 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
module.exports = {
title: "Solana Docs",
tagline:
"Solana is an open source project implementing a new, high-performance, permissionless blockchain.",
url: "https://docs.solana.com",
baseUrl: "/",
favicon: "img/favicon.ico",
organizationName: "solana-labs", // Usually your GitHub org/user name.
projectName: "solana", // Usually your repo name.
themeConfig: {
navbar: {
logo: {
alt: "Solana Logo",
src: "img/logo-horizontal.svg",
srcDark: "img/logo-horizontal-dark.svg",
},
links: [
{
to: "docs/",
activeBasePath: "docs",
label: "Docs",
position: "left",
},
{
to: "docs/apps/README",
activeBasePath: "docs2",
label: "Developers",
position: "left",
},
{
to: "docs/running-validator/README",
activeBasePath: "docs2",
label: "Validators",
position: "left",
},
{
href: "https://discordapp.com/invite/pquxPsq",
label: "Chat",
position: "right",
},

{
href: "https://github.com/solana-labs/solana",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Introduction",
to: "docs/introduction",
},
{
label: "Tour de SOL",
to: "docs/tour-de-sol/README",
},
],
},
{
title: "Community",
items: [
{
label: "Discord",
href: "https://discordapp.com/invite/pquxPsq",
},
{
label: "Twitter",
href: "https://twitter.com/solana",
},
{
label: "Forums",
href: "https://forums.solana.com",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/solana-labs/solana",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Solana Foundation`,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
// It is recommended to set document id as docs home page (`docs/` path).
homePageId: "introduction",
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/solana-labs/solana/edit/master/docs/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};
Loading

0 comments on commit 1879b53

Please sign in to comment.