-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add homepages for each learn, build and user #94
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package learn | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
const lightCodeTheme = require("prism-react-renderer/themes/github"); | ||
const darkCodeTheme = require("prism-react-renderer/themes/dracula"); | ||
|
||
const lastVersion = "0.50"; | ||
|
||
const lastVersion = "v0.50"; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated all of these so they are consistent |
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
|
@@ -44,12 +45,13 @@ const config = { | |
current: { | ||
path: "main", | ||
banner: "unreleased", | ||
label: "Main", | ||
}, | ||
"0.50": { | ||
"v0.50": { | ||
path: "v0.50", | ||
label: "v0.50", | ||
}, | ||
0.47: { | ||
"v0.47": { | ||
path: "v0.47", | ||
label: "v0.47", | ||
}, | ||
|
@@ -83,9 +85,11 @@ const config = { | |
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
image: "img/banner.jpg", | ||
exclude: "docs/learn/learn.md", | ||
docs: { | ||
sidebar: { | ||
autoCollapseCategories: true, | ||
|
||
}, | ||
}, | ||
navbar: { | ||
|
@@ -98,33 +102,115 @@ const config = { | |
target: "_self", | ||
}, | ||
items: [ | ||
{ | ||
type: "doc", | ||
{ | ||
type: "dropdown", | ||
label: "Learn", | ||
docId: "learn/intro/overview", | ||
position: "left", | ||
items: [ | ||
{ | ||
type: "doc", | ||
label: "Home", | ||
docId: "learn/learn", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Introduction", | ||
docId: "learn/intro/overview", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Beginner", | ||
docId: "learn/beginner/app-anatomy", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Advanced", | ||
docId: "learn/advanced/baseapp", | ||
}, | ||
] | ||
}, | ||
{ | ||
type: 'dropdown', | ||
label: 'Build', | ||
position: 'left', | ||
items: [ | ||
{ | ||
type: "doc", | ||
label: "Home", | ||
docId: "build/build", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Build Apps", | ||
docId: "build/building-apps/app-go", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Build a Module", | ||
docId: "build/building-modules/intro", | ||
}, | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the thought behind doing a dropdown for everything? |
||
type: "doc", | ||
label: "Migrations", | ||
docId: "build/migrations/intro", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Packages", | ||
docId: "build/packages/README", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Tooling", | ||
docId: "build/tooling/README", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "ADR's", | ||
docId: "build/architecture/README", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "RFC", | ||
docId: "build/rfc/README", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Specifications", | ||
docId: "build/spec/README", | ||
}, | ||
{ | ||
label: "Cosmos SDK API", | ||
to: "api", | ||
}, | ||
], | ||
}, | ||
{ | ||
type: "doc", | ||
type: "dropdown", | ||
label: "User Guides", | ||
docId: "user/run-node/keyring", // I find it weird that it points to the keyring and not a common page | ||
position: "left", | ||
items: [ | ||
{ | ||
type: "doc", | ||
label: "Home", | ||
docId: "user/user", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Setting up Keys", | ||
docId: "user/run-node/keyring", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "Running a Node", | ||
docId: "user/run-node/run-node", | ||
}, | ||
{ | ||
type: "doc", | ||
label: "CLI", | ||
docId: "user/run-node/interact-node", | ||
}, | ||
] | ||
}, | ||
{ | ||
href: "https://github.com/cosmos/cosmos-sdk", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,152 @@ | |
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ | ||
const sidebars = { | ||
// By default, Docusaurus generates a sidebar from the docs folder structure | ||
learnSidebar: [{ type: "autogenerated", dirName: "learn" }], | ||
buildSidebar: [{ type: "autogenerated", dirName: "build" }], | ||
userSidebar: [{ type: "autogenerated", dirName: "user" }], | ||
"learnSidebar": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all these had to be changed to ensure that the learn/learn page above (where i commented about the versioning) is not possible to get to |
||
{ | ||
"type": "category", | ||
"label": "Introduction", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "learn/intro" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Beginner", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "learn/beginner" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Advanced", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "learn/advanced" | ||
} | ||
] | ||
} | ||
], | ||
"buildSidebar": [ | ||
{ | ||
"type": "category", | ||
"label": "Building Apps", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/building-apps" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Building Modules", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/building-modules" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Modules", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/modules" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Migrations", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/migrations" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Packages", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/packages" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Tooling", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/tooling" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "ADR's", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/architecture" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Migrations", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/migrations" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "RFC's", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/rfc" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Specifications", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "build/spec" | ||
} | ||
] | ||
} | ||
], | ||
"userSidebar": [ | ||
{ | ||
"type": "category", | ||
"label": "Running a Node, API and CLI", | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "user/run-node" | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
|
||
module.exports = sidebars; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from "react"; | ||
import clsx from "clsx"; | ||
import styles from "./styles.module.css"; | ||
import Link from "@docusaurus/Link"; | ||
|
||
|
||
|
||
function Feature({Svg, to, title, description }) { | ||
return ( | ||
<div className="col col--4"> | ||
<div className={styles.bg}> | ||
<Link to={to}> | ||
<div className=" text--center"> | ||
<Svg className={styles.featureSvg} role="img" /> | ||
</div> | ||
</Link> | ||
<div className="text--center padding-horiz--md"> | ||
<h3 className="py-5"> | ||
<strong>{title}</strong> | ||
</h3> | ||
<p className="pb-10">{description}</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function HomepageFeatures({list}) { | ||
return ( | ||
<section className={styles.features}> | ||
<div className="container pt-9"> | ||
<div className="row"> | ||
{list.map((props, idx) => ( | ||
<Feature key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Havent figured out a way of adding a
docsId
to the pages/learn yet. Tried inserting some react but this is a bit of a hacky workaround for now to ensure the versioning works.