From 1b64938bef74c97ba2b06e19f60a1e345aab6210 Mon Sep 17 00:00:00 2001 From: Nikita Khateev Date: Wed, 6 Dec 2023 17:33:19 +0400 Subject: [PATCH] [19] docs init commit --- docs/antora.yml | 8 +++++ docs/modules/ROOT/nav.adoc | 3 ++ docs/modules/ROOT/pallets/pallet-proxy.adoc | 0 docs/modules/ROOT/pallets/pallet.adoc | 36 +++++++++++++++++++++ docs/templates/pallet.adoc | 36 +++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 docs/antora.yml create mode 100644 docs/modules/ROOT/nav.adoc create mode 100644 docs/modules/ROOT/pallets/pallet-proxy.adoc create mode 100644 docs/modules/ROOT/pallets/pallet.adoc create mode 100644 docs/templates/pallet.adoc diff --git a/docs/antora.yml b/docs/antora.yml new file mode 100644 index 0000000..70bc1f4 --- /dev/null +++ b/docs/antora.yml @@ -0,0 +1,8 @@ +name: substrate-runtimes +title: Substrate Runtime Templates +version: 0.8.0 +nav: + - modules/ROOT/nav.adoc +asciidoc: + attributes: + page-sidebar-collapse-default: true \ No newline at end of file diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc new file mode 100644 index 0000000..de3e46c --- /dev/null +++ b/docs/modules/ROOT/nav.adoc @@ -0,0 +1,3 @@ +* Runtime Descriptions +* Pallet guides +** xref:pallets/pallet.adoc[pallet2] \ No newline at end of file diff --git a/docs/modules/ROOT/pallets/pallet-proxy.adoc b/docs/modules/ROOT/pallets/pallet-proxy.adoc new file mode 100644 index 0000000..e69de29 diff --git a/docs/modules/ROOT/pallets/pallet.adoc b/docs/modules/ROOT/pallets/pallet.adoc new file mode 100644 index 0000000..1160158 --- /dev/null +++ b/docs/modules/ROOT/pallets/pallet.adoc @@ -0,0 +1,36 @@ +:source-highlighter: highlight.js +:highlightjs-languages: rust +:github-icon: pass:[] += Pallet Name + +== Purpose + +This is a freeform description of the tasks that this pallet fulfills + +== Config + +* `ConfigType` -- desription of config. Include the possible values if there is a set of them. + +== Dispatchables + +[[add_proxy]] +=== `++dispatchable_name++` link:https://google.com[{github-icon},role=heading-link] +```rust +pub fn dispatchable_name( + param1: Type1, + param2: Type2 +) -> DispatchResult +``` +Freeform description of the dispatchable. It is good to include the important things that should be included there. + +**Params:** + +* `param1: Type1` -- description of the parameter + +**Errors:** + +* `ErrorName` -- description of conditions, when this error happens + +**Events:** + +* `EventName(param1, param2)` -- description of event, if needed (they are often self-explanatory) \ No newline at end of file diff --git a/docs/templates/pallet.adoc b/docs/templates/pallet.adoc new file mode 100644 index 0000000..1160158 --- /dev/null +++ b/docs/templates/pallet.adoc @@ -0,0 +1,36 @@ +:source-highlighter: highlight.js +:highlightjs-languages: rust +:github-icon: pass:[] += Pallet Name + +== Purpose + +This is a freeform description of the tasks that this pallet fulfills + +== Config + +* `ConfigType` -- desription of config. Include the possible values if there is a set of them. + +== Dispatchables + +[[add_proxy]] +=== `++dispatchable_name++` link:https://google.com[{github-icon},role=heading-link] +```rust +pub fn dispatchable_name( + param1: Type1, + param2: Type2 +) -> DispatchResult +``` +Freeform description of the dispatchable. It is good to include the important things that should be included there. + +**Params:** + +* `param1: Type1` -- description of the parameter + +**Errors:** + +* `ErrorName` -- description of conditions, when this error happens + +**Events:** + +* `EventName(param1, param2)` -- description of event, if needed (they are often self-explanatory) \ No newline at end of file