Skip to content
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

docs: reorg & rename top level docs #1455

Merged
merged 4 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Gno is an interpreted and fully-deterministic implementation of the Go
programming language, designed to build succinct and composable smart contracts.
The first blockchain to use it is Gno.land, a
[Proof of Contribution](./docs/explanation/proof-of-contribution.md)-based chain, backed by
[Proof of Contribution](docs/concepts/proof-of-contribution.md)-based chain, backed by
a variation of the [Tendermint](https://docs.tendermint.com/v0.34/introduction/what-is-tendermint.html)
consensus engine.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/getting-started/browsing-gno-source-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ id: browsing-gno-source-code

## Overview

In this tutorial, you will learn how to browse deployed Gno [Realms](../explanation/realms.md)
and [Packages](../explanation/packages.md). Additionally, you will understand how the `Render` method is utilized
In this tutorial, you will learn how to browse deployed Gno [Realms](../concepts/realms.md)
and [Packages](../concepts/packages.md). Additionally, you will understand how the `Render` method is utilized
to achieve Realm state visibility.

## Prerequisites
Expand Down Expand Up @@ -48,7 +48,7 @@ We should be able to access the website locally on http://127.0.0.1:8888/.

Packages in Gno.land usually have names resembling `gno.land/p/<name>`. Since packages do not contain state, we can only
view their source code on-chain. To learn more about Packages, please check out
the [Packages](../explanation/packages.md) explanation document.
the [Packages](../concepts/packages.md) explanation document.

Using `gnoweb`, we can browse the source code in our browser.
For example, the `avl` package is deployed at `gno.land/p/demo/avl`.
Expand All @@ -68,7 +68,7 @@ In contrast to Packages, Realms in Gno.land usually have names resembling `gno.l

Realms _do_ contain state, and in addition to being able to view their source code on-chain, users can also view their
internal state representation in the form of the `Render()` output. To learn more about Realms, please
check out the [Realms](../explanation/realms.md) explanation document.
check out the [Realms](../concepts/realms.md) explanation document.

Using `gnoweb`, we can browse the Realm `Render()` method output and source code in our browser.
For example, the `boards` Realm is deployed at `gno.land/r/demo/boards`.
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/creating-grc20.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ id: creating-grc20

## Overview

This guide shows you how to write a simple _GRC20_ Smart Contract, or rather a [Realm](../explanation/realms.md), in [Gno (Gnolang)](../explanation/gno-language.md). For actually deploying the Realm, please see the [deployment](deploy.md) guide.
This guide shows you how to write a simple _GRC20_ Smart Contract, or rather a [Realm](../concepts/realms.md), in [Gno (Gnolang)](../concepts/gno-language.md). For actually deploying the Realm, please see the [deployment](deploy.md) guide.

Our _GRC20_ Realm will have the following functionality:

Expand Down Expand Up @@ -153,7 +153,7 @@ Detailing what is happening in the above code:
- Calling the `Mint` method would create a configurable number of tokens by the administrator.
- Calling the `Burn` method would destroy a configurable number of tokens by the administrator.
- Calling the `Render` method would return a user's `balance` as a formatted string. Learn more about the `Render`
method and how it's used [here](../explanation/realms.md).
method and how it's used [here](../concepts/realms.md).
- Finally, we provide a local function to assert that the calling account is in fact the owner, otherwise panic. This is a very important function that serves to prevent abuse by non-administrators.

## Conclusion
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to-guides/creating-grc721.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ id: creating-grc721

## Overview

This guide shows you how to write a simple _GRC721_ Smart Contract, or rather a [Realm](../explanation/realms.md),
in [Gno (Gnolang)](../explanation/gno-language.md). For actually deploying the Realm, please see
This guide shows you how to write a simple _GRC721_ Smart Contract, or rather a [Realm](../concepts/realms.md),
in [Gno (Gnolang)](../concepts/gno-language.md). For actually deploying the Realm, please see
the [deployment](deploy.md) guide.

Our _GRC721_ Realm will have the following functionality:
Expand Down Expand Up @@ -186,7 +186,7 @@ Detailing what is happening in the above code:
method on the `grc721` instance we instantiated at the top of the file; this method returns a formatted string that
includes the token: symbol, supply and account balances (`balances avl.Tree`) which is a mapping denoted
as: `OwnerAddress -> TokenCount`; otherwise returns false and renders a `404`; you can find more information about
this `Render` method and how it's used [here](../explanation/realms.md).
this `Render` method and how it's used [here](../concepts/realms.md).
- Finally, we provide a local function to assert that the calling account is in fact the owner, otherwise panic. This is
a very important function that serves to prevent abuse by non-administrators.

Expand Down
8 changes: 4 additions & 4 deletions docs/how-to-guides/simple-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ id: simple-contract

## Overview

This guide shows you how to write a simple _Counter_ Smart Contract, or rather a [Realm](../explanation/realms.md),
in [Gno (Gnolang)](../explanation/gno-language.md). For actually deploying the Realm, please see
This guide shows you how to write a simple _Counter_ Smart Contract, or rather a [Realm](../concepts/realms.md),
in [Gno (Gnolang)](../concepts/gno-language.md). For actually deploying the Realm, please see
the [deployment](deploy.md) guide.

Our _Counter_ Realm will have the following functionality:
Expand Down Expand Up @@ -50,7 +50,7 @@ cd counter-app
mkdir r
```

Alternatively, if we were writing a [Gno Package](../explanation/packages.md), we would denote this directory name
Alternatively, if we were writing a [Gno Package](../concepts/packages.md), we would denote this directory name
as `p` (for `package`). You can learn more about Packages in our [Package development guide](simple-library.md).

Additionally, we will create another sub-folder that will house our Realm code, named `counter`:
Expand Down Expand Up @@ -115,7 +115,7 @@ There are a few things happening here, so let's dissect them:
- `Increment` and `Decrement` are public Realm (Smart Contract) methods, and as such are callable by users.
- `Increment` and `Decrement` directly modify the `count` value by making it go up or down (change state).
- Calling the `Render` method would return the `count` value as a formatted string. Learn more about the `Render`
method and how it's used [here](../explanation/realms.md).
method and how it's used [here](../concepts/realms.md).

:::info A note on constructors
Gno Realms support a concept taken from other programming languages - _constructors_.
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/simple-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ id: simple-library

This guide shows you how to write a simple library (Package) in Gnolang, which can be used by other Packages and Realms.
Packages are _stateless_, meaning they do not hold state like regular Realms (Smart Contracts). To learn more about the
intricacies of Packages, please see the [Packages reference](../explanation/packages.md).
intricacies of Packages, please see the [Packages reference](../concepts/packages.md).

The Package we will be writing today will be a simple library for suggesting a random tapas dish.
We will define a set list of tapas, and define a method that randomly selects a dish from the list.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/standard-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ id: standard-library

# Gno Standard Library

When developing a realm in Gnolang, developers may utilize libraries in [stdlibs](https://github.com/gnolang/gno/tree/master/gnovm/stdlibs). These are the core standard packages provided for Gnolang [Realms ](../explanation/realms.md)& [Packages](../explanation/packages.md).
When developing a realm in Gnolang, developers may utilize libraries in [stdlibs](https://github.com/gnolang/gno/tree/master/gnovm/stdlibs). These are the core standard packages provided for Gnolang [Realms ](../concepts/realms.md)& [Packages](../concepts/packages.md).

Libraries can be imported in a manner similar to how libraries are imported in Golang.

Expand Down
52 changes: 27 additions & 25 deletions misc/docusaurus/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@ const sidebars = {
'how-to-guides/connect-wallet-dapp',
],
},
{
type: 'category',
label: 'Concepts',
items: [
'concepts/realms',
'concepts/packages',
'concepts/tendermint2',
'concepts/gnovm',
'concepts/proof-of-contribution',
'concepts/gno-language',
'concepts/gno-modules',
'concepts/gno-test',
'concepts/from-go-to-gno',

leohhhn marked this conversation as resolved.
Show resolved Hide resolved
],
},
{
type: 'category',
label: 'Gno Tooling',
items: [
'concepts/gno-tooling/cli/gno-tooling-gno',
'concepts/gno-tooling/cli/gno-tooling-gnokey',
'concepts/gno-tooling/cli/gno-tooling-gnofaucet',
'concepts/gno-tooling/cli/gno-tooling-gnoland',
'concepts/gno-tooling/cli/gno-tooling-tm2txsync',
]
},
{
type: 'category',
label: 'Reference',
Expand Down Expand Up @@ -81,31 +108,6 @@ const sidebars = {
},
],
},
{
type: 'category',
label: 'Explanation',
items: [
'explanation/realms',
'explanation/tendermint2',
'explanation/gnovm',
'explanation/proof-of-contribution',
'explanation/gno-language',
'explanation/gno-modules',
'explanation/gno-test',
'explanation/from-go-to-gno',
{
type: 'category',
label: 'Gno Tooling',
items: [
'explanation/gno-tooling/cli/gno-tooling-gno',
'explanation/gno-tooling/cli/gno-tooling-gnokey',
'explanation/gno-tooling/cli/gno-tooling-gnofaucet',
'explanation/gno-tooling/cli/gno-tooling-gnoland',
'explanation/gno-tooling/cli/gno-tooling-tm2txsync',
]
},
],
},
],
};

Expand Down
Loading