-
Notifications
You must be signed in to change notification settings - Fork 942
Introduce Polkadot-Sdk developer_hub
#2102
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
Changes from 32 commits
a451f7e
68a053b
f7460d8
b785e5c
00a0fec
50c78b4
89e00e9
c91250b
6d57d2e
76f2277
08802f8
2ec4541
a826834
8e2f6b8
df2d645
58d60cb
c8f7f1e
198a3e6
bcdc9d5
4664874
d542ff1
2f76ba1
00ec677
9b1db8c
7dba4f8
3519a03
0d72dd7
9942120
60a37a1
1896ac7
30d6ac2
a56d3b1
641ff3a
3baa30c
9c2b3ea
62b69fc
4c8939b
7b225e1
0f55b9a
d08ab24
b9ee9c1
a873808
2d5814b
94eeed6
745c7fd
d305146
1d1e4a0
74eb750
36baa71
8defde9
7c839fe
196d1d7
f3b1b5b
832c8e0
679d60b
8788c27
2231d51
8ce5fcc
bb14a83
188e308
0738681
d622d84
85d4e63
d13a924
b19ffc4
a14ac7c
7db6f4d
d09bfd4
cd4cddd
cff2de6
4d7020c
1955b38
44ebcf2
d5bcd10
6a8aea3
0a8ce8d
cefc9d4
f65ece4
1166806
9e08068
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Rust Docs | ||
rcny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
on: | ||
push: | ||
branches: [kiz-developer-hub] | ||
kianenigma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Setup protoc | ||
- name: Set up Protocol Buffers | ||
uses: arduino/setup-protoc@v1 | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rust-docs | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Generate docs | ||
run: cargo doc -p developer-hub -p sp-io -p sp-runtime -p frame -p frame-support --no-deps | ||
|
||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: target/doc # The folder the action should deploy. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[package] | ||
name = "developer-hub" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no consensus yet There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @liamaharon I've created a separate PR to address that so we don't add more noise to this one |
||
description = "The one stop shop for developers of the polakdot-sdk" | ||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0" | ||
homepage = "paritytech.github.io" | ||
repository.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
# This crate is not publish-able to crates.io for now because of docify. | ||
publish = false | ||
version = "0.0.1" | ||
|
||
[dependencies] | ||
# Needed for all FRAME-based code | ||
parity-scale-codec = { version = "3.0.0", default-features = false } | ||
scale-info = { version = "2.6.0", default-features = false } | ||
frame = { path = "../substrate/frame", features = ["runtime", "experimental"] } | ||
pallet-examples = { path = "../substrate/frame/examples" } | ||
pallet-default-config-example = { path = "../substrate/frame/examples/default-config" } | ||
|
||
# How we build docs in rust-docs | ||
simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", branch = "main" } | ||
docify = "0.2.6" | ||
|
||
# Polkadot SDK docs, typically all should only be scope such that we can link to their doc item. | ||
|
||
node-cli = { package = "staging-node-cli", path = "../substrate/bin/node/cli" } | ||
kitchensink-runtime = { path = "../substrate/bin/node/runtime" } | ||
chain-spec-builder = { package = "staging-chain-spec-builder", path = "../substrate/bin/utils/chain-spec-builder" } | ||
subkey = { path = "../substrate/bin/utils/subkey" } | ||
|
||
sc-network = { path = "../substrate/client/network" } | ||
sc-rpc-api = { path = "../substrate/client/rpc-api" } | ||
sc-rpc = { path = "../substrate/client/rpc" } | ||
sc-client-db = { path = "../substrate/client/db" } | ||
sc-cli = { path = "../substrate/client/cli" } | ||
sc-consensus-aura = { path = "../substrate/client/consensus/aura" } | ||
sc-consensus-babe = { path = "../substrate/client/consensus/babe" } | ||
sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } | ||
sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } | ||
sc-consensus-manual-seal = { path = "../substrate/client/consensus/manual-seal" } | ||
sc-consensus-pow = { path = "../substrate/client/consensus/pow" } | ||
substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } | ||
|
||
sp-io = { path = "../substrate/primitives/io" } | ||
sp-api = { path = "../substrate/primitives/api" } | ||
sp-core = { path = "../substrate/primitives/core" } | ||
sp-keyring = { path = "../substrate/primitives/keyring" } | ||
sp-runtime = { path = "../substrate/primitives/runtime" } | ||
|
||
[dev-dependencies] | ||
cumulus-pallet-aura-ext = { path = "../cumulus/pallets/aura-ext" } | ||
cumulus-pallet-parachain-system = { path = "../cumulus/pallets/parachain-system", features = [ | ||
"parameterized-consensus-hook", | ||
] } | ||
parachain-info = { package = "staging-parachain-info", path = "../cumulus/parachains/pallets/parachain-info" } | ||
pallet-aura = { path = "../substrate/frame/aura" } | ||
pallet-timestamp = { path = "../substrate/frame/timestamp" } | ||
|
||
parity-scale-codec = "3.6.5" | ||
scale-info = "2.9.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script> | ||
window.addEventListener("DOMContentLoaded", (event) => { | ||
// if the crate is one that starts with `developer_hub` | ||
let crate_name = document.querySelector("#main-content > div > h1 > a:nth-child(1)"); | ||
if (!crate_name.textContent.startsWith("developer_hub")) { | ||
console.log("skipping -- not `developer_hub`"); | ||
} | ||
|
||
let sidebar = document.querySelector(".sidebar"); | ||
let headers = document.querySelectorAll("#main-content h2, #main-content h3, #main-content h4"); | ||
console.log(`detected developer_hub: headers: ${headers.length}`); | ||
|
||
let toc = document.createElement("div"); | ||
toc.classList.add("table-of-contents"); | ||
toc.appendChild(document.createElement("h2").appendChild(document.createTextNode("Table of Contents")).parentNode); | ||
|
||
// the first two headers are always junk | ||
headers.forEach(header => { | ||
let link = document.createElement("a"); | ||
link.href = "#" + header.id; | ||
link.textContent = header.textContent; | ||
link.className = header.tagName.toLowerCase(); | ||
toc.appendChild(link); | ||
}); | ||
|
||
sidebar.insertBefore(toc, sidebar.firstChild); | ||
console.log("injecting ToC"); | ||
}); | ||
</script> | ||
<style> | ||
.table-of-contents { | ||
margin-bottom: 1em; | ||
padding: 0.5em; | ||
} | ||
|
||
.table-of-contents a { | ||
display: block; | ||
margin: 0.2em 0; | ||
} | ||
|
||
.table-of-contents .h2 { | ||
font-weight: bold; | ||
margin-left: 0; | ||
} | ||
|
||
.table-of-contents .h3 { | ||
margin-left: 1em; | ||
} | ||
|
||
.table-of-contents .h4 { | ||
margin-left: 2em; | ||
} | ||
</style> |
Uh oh!
There was an error while loading. Please reload this page.