paritytech / polkadot-sdk-docs

_THE_ Polkadot SDK Tutorial
19 stars 0 forks source link

Tracking Issue for Reference Docs #4

Open kianenigma opened 1 year ago

kianenigma commented 1 year ago

Reference docs are topics that are too high level to be explained in a rust-doc, and too low level to be explained in a high level tutorial. The goal is to minimize this category.

FRAME, Substrate

Pretty much every lecture in PBA is a candidate.

Misc

### Subtasks
- [ ] https://github.com/paritytech/polkadot-sdk-docs/issues/34
- [ ] https://github.com/paritytech/polkadot-sdk-docs/issues/39
kianenigma commented 11 months ago

A few guidelines about writing reference docs:

  1. They will be standalone crates in the mono-repo, in a location that is yet to be decided (probably in https://github.com/paritytech/polkadot-sdk/pull/1477)
  2. These crates will contain no meaningful code. The only reason for them to have code snippets is to be able to showcase them in the rendered rust-doc with docify. See https://github.com/paritytech/polkadot-sdk/issues/991.
  3. These crates will bring in dependencies such that they can docify types and traits from their dependencies. For example, it should be pretty common to pull in sp-runtime and frame-support such that you can docify and grab a trait form a path in these crates and show it in your docs.
  4. While writing reference docs, consider the following:
    • If the concept you are documenting can be explained in rust-docs, just do it there.
    • Consequently, keep reference docs at minimum length. They will be a maintenance burden. The fewer lines of text, the better.
    • In other words, heavily rely on the principle of ground-up, Less-is-more and DRY.
  5. Once done, please identify which pages of substrate.io are covering the same topic. Make a PR to https://github.com/substrate-developer-hub/substrate-docs/ which adds a banner to these pages that clearly says "the content of this page might have been deprecated by now, and the latest version is ". @wentelteefje and I can help with providing a template for this.