gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
882 stars 367 forks source link

[docs] Refactor page IDs to be more consistent #2262

Open leohhhn opened 4 months ago

leohhhn commented 4 months ago

Description

We should refactor the docs pages ID to be more consistent. Docusaurus reads the folder structure along with the ID, so we should use this. An example currently is the following:

docs/gno-tooling/cli/gnokey.md with the id gno-tooling-gnokey. We can simply replace the ID here with gnokey.

This will also simplify the https links from https://docs.gno.land/gno-tooling/cli/gno-tooling-gnokey to simply https://docs.gno.land/gno-tooling/cli/gnokey, which is less redundant.

After implementing the changes in this repo, the same needs to be matched in the docs.gno.land repo.

Kouteki commented 4 months ago

Discussion needed on whether this is the best approach, since IDs need to be unique

leohhhn commented 4 months ago

IDs do need to be unique, but on a per-dir basis. The way docusaurus works is that it takes the path of the file, and appends the file's ID to the end, which creates the path that is read from sidebars.js.

grepsuzette commented 3 months ago

In my eyes the second one is even more legible:

We have a lot of gno products already, it's good to use bland labels where we can.