paritytech/polkadot-sdk-docs

Tracking Issue for Reference Docs

Opened this issue · 1 comments

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

  1. L1-ref-docs
    CrackTheCode016
  2. 11 of 23
    L1-ref-docs

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 paritytech/polkadot-sdk#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 paritytech/polkadot-sdk#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.