Skip to content

Commit

Permalink
add build section (massalabs#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey authored May 29, 2023
1 parent 8687463 commit 94a0292
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 76 deletions.
9 changes: 9 additions & 0 deletions docs/build/home.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: home
sidebar_label: Home
---

# Build

TODO: This home page should point to the relevant resources of the build section in a user-friendly way (icons and short
description).
37 changes: 37 additions & 0 deletions docs/build/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: quickstart
sidebar_label: Quickstart
---

# Build your first decentralized application

TODO: Explain what we will do: build a hello world app

We will build:

- sc
- frontend

## Smart Contract

### Setting up your project

TODO: How to create a new project

### Writing a smart contract

TODO: Code walkthrough

### Deploy

TODO: How to deploy

## Frontend

## Testing

TODO

## Next steps

TODO: Refer to smart contract doc or to examples.
131 changes: 68 additions & 63 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,148 +1,153 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const math = require('remark-math');
const katex = require('rehype-katex');
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const math = require("remark-math");
const katex = require("rehype-katex");

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Massa Documentation',
tagline: 'Dinosaurs are cool',
favicon: 'img/logo.svg',
title: "Massa Documentation",
tagline: "Dinosaurs are cool",
favicon: "img/logo.svg",

// Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
url: "https://your-docusaurus-test-site.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/docu-dev/',
baseUrl: "/docu-dev/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'massalabs', // Usually your GitHub org/user name.
projectName: 'docu-dev', // Usually your repo name.
organizationName: "massalabs", // Usually your GitHub org/user name.
projectName: "docu-dev", // Usually your repo name.
trailingSlash: false,

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
defaultLocale: "en",
locales: ["en"],
},

stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
type: 'text/css',
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
type: "text/css",
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
crossorigin: "anonymous",
},
],

presets: [
[
'classic',
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/massalabs/docu-dev/tree/main/',
editUrl: "https://github.com/massalabs/docu-dev/tree/main/",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [math],
rehypePlugins: [katex],
},
blog: {},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: require.resolve("./src/css/custom.css"),
},
}),
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
{
// Replace with your project's social card
navbar: {
title: 'Docs',
title: "Docs",
logo: {
alt: 'My Site Logo',
src: 'img/massa_logo.svg',
srcDark: 'img/massa_logo_white.svg',
alt: "My Site Logo",
src: "img/massa_logo.svg",
srcDark: "img/massa_logo_white.svg",
},
items: [
{
type: 'docSidebar',
sidebarId: 'learnSidebar',
position: 'left',
label: 'Learn',
type: "docSidebar",
sidebarId: "learnSidebar",
position: "left",
label: "Learn",
},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Tutorial",
},
{
type: 'docSidebar',
sidebarId: 'nodeSidebar',
position: 'left',
label: 'Testnet',
type: "docSidebar",
sidebarId: "buildSidebar",
position: "left",
label: "🛠️ Build",
},
{
type: 'docSidebar',
sidebarId: 'rpcSidebar',
position: 'left',
label: 'RPC',
type: "docSidebar",
sidebarId: "nodeSidebar",
position: "left",
label: "Testnet",
},
{
href: 'https://github.com/massalabs/',
label: 'GitHub',
position: 'right',
type: "docSidebar",
sidebarId: "rpcSidebar",
position: "left",
label: "RPC",
},
{
href: "https://github.com/massalabs/",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: 'dark',
style: "dark",
links: [
{
title: 'Docs',
title: "Docs",
items: [
{
label: 'Tutorial',
to: '/docs/smart-contract/intro',
label: "Tutorial",
to: "/docs/smart-contract/intro",
},
],
},
{
title: 'Community',
title: "Community",
items: [
{
label: 'Discord',
href: 'https://discord.gg/massa',
label: "Discord",
href: "https://discord.gg/massa",
},
{
label: 'Twitter',
href: 'https://twitter.com/massalabs',
label: "Twitter",
href: "https://twitter.com/massalabs",
},
],
},
{
title: 'More',
title: "More",
items: [
{
label: 'GitHub',
href: 'https://github.com/massalabs',
label: "GitHub",
href: "https://github.com/massalabs",
},
],
},
Expand All @@ -153,7 +158,7 @@ const config = {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
},
};

module.exports = config;
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 29 additions & 8 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,39 @@ const sidebars = {
],
},
],
buildSidebar: [
{
type: "doc",
id: "build/home",
},
{
type: "html",
value: "<hr/>",
},
{
type: "html",
value:
"<span class='menu__link'><b><small> Build a dApp </small></b></span>",
},
{
type: "doc",
id: "build/quickstart",
},
],
nodeSidebar: [
{
type: "doc",
id: "node/home",
label: "Home",
},
{
"type": "html",
"value": "<hr/>"
type: "html",
value: "<hr/>",
},
{
"type": "html",
"value": "<span class='menu__link'><b><small> Running a Node </small></b></span>"
type: "html",
value:
"<span class='menu__link'><b><small> Running a Node </small></b></span>",
},
{
type: "doc",
Expand Down Expand Up @@ -130,12 +150,13 @@ const sidebars = {
label: "Testnet Staking Rewards Program",
},
{
"type": "html",
"value": "<hr/>"
type: "html",
value: "<hr/>",
},
{
"type": "html",
"value": "<span class='menu__link'><b><small> FAQ and Community </small></b></span>"
type: "html",
value:
"<span class='menu__link'><b><small> FAQ and Community </small></b></span>",
},
{
type: "doc",
Expand Down
8 changes: 4 additions & 4 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import clsx from 'clsx';
import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import styles from './styles.module.css';
import styles from "./styles.module.css";

const FeatureList = [
// {
Expand All @@ -20,7 +20,7 @@ const FeatureList = [
{
title: "Start Building",
content: "Start building your decentralized application.",
docName: "docs/smart-contract/intro",
docName: "docs/build/home",
icon: "🛠️",
},
{
Expand Down

0 comments on commit 94a0292

Please sign in to comment.