setting up bones for documentation

This commit is contained in:
Marston Connell 2022-07-09 13:17:54 -04:00
parent e1c43f4b94
commit 3ff468781d
17 changed files with 50 additions and 228 deletions

View File

@ -0,0 +1,8 @@
{
"label": "The Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "The bare bones of what you need to start using the Jackal Chain!"
}
}

View File

@ -2,46 +2,22 @@
sidebar_position: 1
---
# Tutorial Intro
# Getting Started
Let's discover **Docusaurus in less than 5 minutes**.
Jackal is a sovereign blockchain built with the CosmosSDK. Jackal uses the Tendermint Consensus engine to achieve high throughput and secure transactions.
## Getting Started
## Installing
Get started by **creating a new site**.
To use Jackal you'll need a wallet! There are two ways to get a wallet and interact with the blockchain.
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
### Command Line Interface (CLI)
### What you'll need
To interact with the Jackal chain from the command line, you'll need the CLI tool. You can download this [here](https://github.com/JackalLabs/canine-chain/releases).
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
### Web wallet
## Generate a new site
You can interact with Jackal through several web wallets. The most common is [Keplr](https://wallet.keplr.app/), this will give you access to the entirety of the Cosmos ecosystem.
Generate a new Docusaurus site using the **classic template**.
## Using the Jackal Chain
The classic template will automatically be added to your project after you run the command:
```bash
npm init docusaurus@latest my-website classic
```
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run Docusaurus.
## Start your site
Run the development server:
```bash
cd my-website
npm run start
```
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
Head over to https://beta.jackaldao.com to start your journey into using the Jackal Wallet.

View File

@ -1,8 +0,0 @@
{
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}

View File

@ -1,7 +0,0 @@
{
"label": "Tutorial - Extras",
"position": 3,
"link": {
"type": "generated-index"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,55 +0,0 @@
---
sidebar_position: 1
---
# Manage Docs Versions
Docusaurus can manage multiple versions of your docs.
## Create a docs version
Release a version 1.0 of your project:
```bash
npm run docusaurus docs:version 1.0
```
The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created.
Your docs now have 2 versions:
- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
## Add a Version Dropdown
To navigate seamlessly across versions, add a version dropdown.
Modify the `docusaurus.config.js` file:
```js title="docusaurus.config.js"
module.exports = {
themeConfig: {
navbar: {
items: [
// highlight-start
{
type: 'docsVersionDropdown',
},
// highlight-end
],
},
},
};
```
The docs version dropdown appears in your navbar:
![Docs Version Dropdown](./img/docsVersionDropdown.png)
## Update an existing version
It is possible to edit versioned docs in their respective folder:
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`

View File

@ -1,88 +0,0 @@
---
sidebar_position: 2
---
# Translate your site
Let's translate `docs/intro.md` to French.
## Configure i18n
Modify `docusaurus.config.js` to add support for the `fr` locale:
```js title="docusaurus.config.js"
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr'],
},
};
```
## Translate a doc
Copy the `docs/intro.md` file to the `i18n/fr` folder:
```bash
mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/
cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md
```
Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French.
## Start your localized site
Start your site on the French locale:
```bash
npm run start -- --locale fr
```
Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated.
:::caution
In development, you can only use one locale at a same time.
:::
## Add a Locale Dropdown
To navigate seamlessly across languages, add a locale dropdown.
Modify the `docusaurus.config.js` file:
```js title="docusaurus.config.js"
module.exports = {
themeConfig: {
navbar: {
items: [
// highlight-start
{
type: 'localeDropdown',
},
// highlight-end
],
},
},
};
```
The locale dropdown now appears in your navbar:
![Locale Dropdown](./img/localeDropdown.png)
## Build your localized site
Build your site for a specific locale:
```bash
npm run build -- --locale fr
```
Or build your site to include all the locales at once:
```bash
npm run build
```

View File

@ -6,9 +6,9 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
url: 'https://your-docusaurus-test-site.com',
title: 'Jackal Chain Documentation',
tagline: 'The who, what, where, why, when, and how to get started with Jackal\'s blockchain!',
url: 'https://docs.jackaldao.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
@ -16,8 +16,8 @@ const config = {
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
organizationName: 'jackallabs', // Usually your GitHub org/user name.
projectName: 'canine-docs', // Usually your repo name.
// 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
@ -57,9 +57,9 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'My Site',
title: 'Jackal Docs',
logo: {
alt: 'My Site Logo',
alt: 'Jackal Logo',
src: 'img/logo.svg',
},
items: [
@ -67,11 +67,11 @@ const config = {
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Tutorial',
label: 'Getting Started',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
href: 'https://github.com/jackallabs/canine-chain',
label: 'GitHub',
position: 'right',
},
@ -84,25 +84,21 @@ const config = {
title: 'Docs',
items: [
{
label: 'Tutorial',
label: 'Getting Started',
to: '/docs/intro',
},
],
},
{
title: 'Community',
title: 'Connect With Us',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
href: 'https://discord.com/invite/5GKym3p6rj',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
href: 'https://twitter.com/jackal_dao',
},
],
},
@ -114,13 +110,13 @@ const config = {
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
label: 'Contribute to Docs',
href: 'https://github.com/jackallabs/canine-docs',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} Jackal Dao`,
},
prism: {
theme: lightCodeTheme,

View File

@ -6,25 +6,25 @@
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-color-primary: #08B4B2;
--ifm-color-primary-dark: #05817f;
--ifm-color-primary-darker: #046766;
--ifm-color-primary-darkest: #023433;
--ifm-color-primary-light: #46c7c5;
--ifm-color-primary-lighter: #84dad9;
--ifm-color-primary-lightest: #c1eceb;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--ifm-color-primary: #82e09b;
--ifm-color-primary-dark: #64ad77;
--ifm-color-primary-darker: #467a53;
--ifm-color-primary-darkest: #284730;
--ifm-color-primary-light: #a1e8b4;
--ifm-color-primary-lighter: #c1f0cd;
--ifm-color-primary-lightest: #dff7e6;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

View File

@ -18,7 +18,7 @@ function HomepageHeader() {
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min
Get Started
</Link>
</div>
</div>
@ -30,7 +30,7 @@ export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
title={`${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<HomepageHeader />
<main>