Skip to content

Commit a310df2

Browse files
juangiriniserban300chevdorEgorPopelyaevbkchr
authored
Move developer-hub to polkadot-sdk-docs (#2598)
This PR is a continuation of #2102 and part of an initiative started here https://hackmd.io/@romanp/rJ318ZCEp What has been done: - The content under `docs/*` (with the exception of `docs/mermaid`) has been moved to `docs/contributor/` - Developer Hub has been renamed to Polkadot SDK Docs, and the crate has been renamed from `developer-hub` to `polkadot-sdk-docs` - The content under `developer-hub/*` has been moved to `docs/sdk` --- Original PR #2565, it has been close due to too many rebase conflicts --------- Co-authored-by: Serban Iorga <serban@parity.io> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Egor_P <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
1 parent 2f9af78 commit a310df2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+153
-154
lines changed

.github/workflows/check-prdoc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1313
GITHUB_PR: ${{ github.event.pull_request.number }}
1414
ENGINE: docker
15-
PRDOC_DOC: https://github.com/paritytech/polkadot-sdk/blob/master/docs/prdoc.md
15+
PRDOC_DOC: https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/prdoc.md
1616

1717
jobs:
1818
check-prdoc:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ bin/node-template/Cargo.lock
2929
nohup.out
3030
polkadot_argument_parsing
3131
polkadot.*
32+
!docs/sdk/src/polkadot_sdk/polkadot.rs
3233
pwasm-alloc/Cargo.lock
3334
pwasm-libc/Cargo.lock
3435
release-artifacts

.gitlab/pipeline/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ build-rustdoc:
125125
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
126126
}
127127
inject_simple_analytics "./crate-docs"
128-
- echo "<meta http-equiv=refresh content=0;url=developer_hub/index.html>" > ./crate-docs/index.html
128+
- echo "<meta http-equiv=refresh content=0;url=polkadot_sdk_docs/index.html>" > ./crate-docs/index.html
129129

130130
build-implementers-guide:
131131
stage: build

.gitlab/pipeline/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ node-bench-regression-guard:
313313
after_script: [""]
314314

315315
# if this fails run `bot update-ui` in the Pull Request or "./scripts/update-ui-tests.sh" locally
316-
# see ./docs/CONTRIBUTING.md#ui-tests
316+
# see ./docs/contributor/CONTRIBUTING.md#ui-tests
317317
test-frame-ui:
318318
stage: test
319319
extends:

Cargo.lock

+39-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ members = [
106106
"cumulus/test/runtime",
107107
"cumulus/test/service",
108108
"cumulus/xcm/xcm-emulator",
109-
"developer-hub",
109+
"docs/sdk",
110110
"polkadot",
111111
"polkadot/cli",
112112
"polkadot/core-primitives",

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ Below are the primary upstream dependencies utilized in this project:
4646

4747
## Security
4848

49-
The security policy and procedures can be found in [docs/SECURITY.md](./docs/SECURITY.md).
49+
The security policy and procedures can be found in [docs/contributor/SECURITY.md](./docs/contributor/SECURITY.md).
5050

5151
## Contributing & Code of Conduct
5252

53-
Ensure you follow our [contribution guidelines](./docs/CONTRIBUTING.md). In every interaction and contribution, this
54-
project adheres to the [Contributor Covenant Code of Conduct](./docs/CODE_OF_CONDUCT.md).
53+
Ensure you follow our [contribution guidelines](./docs/contributor/CONTRIBUTING.md). In every interaction and
54+
contribution, this project adheres to the [Contributor Covenant Code of Conduct](./docs/contributor/CODE_OF_CONDUCT.md).
5555

5656
## Additional Resources
5757

cumulus/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This repository contains both the Cumulus SDK and also specific chains implemented on top of this SDK.
66

7-
If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/container.md).
7+
If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/contributor/container.md).
88

99
## Cumulus SDK
1010

@@ -34,7 +34,7 @@ A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for
3434
`polkadot-parachain` binary (previously called `polkadot-collator`).
3535

3636
You may run `polkadot-parachain` locally after building it or using one of the container option described
37-
[here](./docs/container.md).
37+
[here](./docs/contributor/container.md).
3838

3939
### Relay Chain Interaction
4040
To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be achieved in one of
@@ -242,7 +242,7 @@ Once the executable is built, launch collators for each parachain (repeat once e
242242
./target/release/polkadot-parachain --chain $CHAIN --validator
243243
```
244244

245-
You can also build [using a container](./docs/container.md).
245+
You can also build [using a container](./docs/contributor/container.md).
246246

247247
### Parachains
248248

developer-hub/Cargo.toml

-66
This file was deleted.
File renamed without changes.
File renamed without changes.

docs/DEPRECATION_CHECKLIST.md docs/contributor/DEPRECATION_CHECKLIST.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ We also need [https://docs.substrate.io/](https://docs.substrate.io/) to be upda
4545

4646
## Announce the deprecation and removal
4747

48-
**At minimum they should be noted in the release log.** Please see how to document a PR [here](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#documentation).
48+
**At minimum they should be noted in the release log.** Please see how to document a PR [here](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#documentation).
4949
There you can give instructions based on the audience and tell them what they need to do to upgrade the code.
5050

5151
Some breaking changes have a bigger impact than others. When the impact is big the release note is not enough, though
File renamed without changes.

docs/PULL_REQUEST_TEMPLATE.md docs/contributor/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
✄ -----------------------------------------------------------------------------
44

55
Thank you for your Pull Request! 🙏 Please make sure it follows the contribution guidelines outlined in
6-
[this document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md) and fill
6+
[this document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md) and fill
77
out the sections below. Once you're ready to submit your PR for review, please
88
delete this section and leave only the text under the "Description" heading.
99

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/mermaid/IA.mmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
flowchart
2-
parity[paritytech.github.io] --> devhub[developer_hub]
2+
parity[paritytech.github.io] --> devhub[polkadot_sdk_docs]
33

44
devhub --> polkadot_sdk
55
devhub --> reference_docs

docs/sdk/Cargo.toml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[package]
2+
name = "polkadot-sdk-docs"
3+
description = "The one stop shop for developers of the polakdot-sdk"
4+
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
5+
homepage = "paritytech.github.io"
6+
repository.workspace = true
7+
authors.workspace = true
8+
edition.workspace = true
9+
# This crate is not publish-able to crates.io for now because of docify.
10+
publish = false
11+
version = "0.0.1"
12+
13+
[dependencies]
14+
# Needed for all FRAME-based code
15+
parity-scale-codec = { version = "3.0.0", default-features = false }
16+
scale-info = { version = "2.6.0", default-features = false }
17+
frame = { path = "../../substrate/frame", features = ["experimental", "runtime"] }
18+
pallet-examples = { path = "../../substrate/frame/examples" }
19+
pallet-default-config-example = { path = "../../substrate/frame/examples/default-config" }
20+
21+
# How we build docs in rust-docs
22+
simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", branch = "main" }
23+
docify = "0.2.6"
24+
25+
# Polkadot SDK deps, typically all should only be scope such that we can link to their doc item.
26+
node-cli = { package = "staging-node-cli", path = "../../substrate/bin/node/cli" }
27+
kitchensink-runtime = { path = "../../substrate/bin/node/runtime" }
28+
chain-spec-builder = { package = "staging-chain-spec-builder", path = "../../substrate/bin/utils/chain-spec-builder" }
29+
subkey = { path = "../../substrate/bin/utils/subkey" }
30+
31+
# Substrate
32+
sc-network = { path = "../../substrate/client/network" }
33+
sc-rpc-api = { path = "../../substrate/client/rpc-api" }
34+
sc-rpc = { path = "../../substrate/client/rpc" }
35+
sc-client-db = { path = "../../substrate/client/db" }
36+
sc-cli = { path = "../../substrate/client/cli" }
37+
sc-consensus-aura = { path = "../../substrate/client/consensus/aura" }
38+
sc-consensus-babe = { path = "../../substrate/client/consensus/babe" }
39+
sc-consensus-grandpa = { path = "../../substrate/client/consensus/grandpa" }
40+
sc-consensus-beefy = { path = "../../substrate/client/consensus/beefy" }
41+
sc-consensus-manual-seal = { path = "../../substrate/client/consensus/manual-seal" }
42+
sc-consensus-pow = { path = "../../substrate/client/consensus/pow" }
43+
substrate-wasm-builder = { path = "../../substrate/utils/wasm-builder" }
44+
45+
# Cumulus
46+
cumulus-pallet-aura-ext = { path = "../../cumulus/pallets/aura-ext" }
47+
cumulus-pallet-parachain-system = { path = "../../cumulus/pallets/parachain-system", features = [
48+
"parameterized-consensus-hook",
49+
] }
50+
parachain-info = { package = "staging-parachain-info", path = "../../cumulus/parachains/pallets/parachain-info" }
51+
pallet-aura = { path = "../../substrate/frame/aura", default-features = false }
52+
pallet-timestamp = { path = "../../substrate/frame/timestamp" }
53+
54+
# Primitives
55+
sp-io = { path = "../../substrate/primitives/io" }
56+
sp-api = { path = "../../substrate/primitives/api" }
57+
sp-core = { path = "../../substrate/primitives/core" }
58+
sp-keyring = { path = "../../substrate/primitives/keyring" }
59+
sp-runtime = { path = "../../substrate/primitives/runtime" }
60+
61+
[dev-dependencies]
62+
parity-scale-codec = "3.6.5"
63+
scale-info = "2.9.0"
64+
65+
[features]
66+
experimental = ["pallet-aura/experimental"]

developer-hub/headers/toc.html docs/sdk/headers/toc.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script>
22
window.addEventListener("DOMContentLoaded", (event) => {
3-
// if the crate is one that starts with `developer_hub`
3+
// if the crate is one that starts with `polkadot_sdk_docs`
44
let crate_name = document.querySelector("#main-content > div > h1 > a:nth-child(1)");
5-
if (!crate_name.textContent.startsWith("developer_hub")) {
6-
console.log("skipping -- not `developer_hub`");
5+
if (!crate_name.textContent.startsWith("polkadot_sdk_docs")) {
6+
console.log("skipping -- not `polkadot_sdk_docs`");
77
return;
88
}
99

1010
let sidebar = document.querySelector(".sidebar");
1111
let headers = document.querySelectorAll("#main-content h2, #main-content h3, #main-content h4");
12-
console.log(`detected developer_hub: headers: ${headers.length}`);
12+
console.log(`detected polkadot_sdk_docs: headers: ${headers.length}`);
1313

1414
let toc = document.createElement("div");
1515
toc.classList.add("table-of-contents");

developer-hub/src/guides/mod.rs docs/sdk/src/guides/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! # Polkadot Developer Hub Guides
1+
//! # Polkadot SDK Docs Guides
22
//!
33
//! This crate contains a collection of guides that are foundational to the developers of
44
//! Polkadot SDK. They common user-journeys that are traversed in the Polkadot ecosystem.

developer-hub/src/guides/your_first_pallet/mod.rs docs/sdk/src/guides/your_first_pallet/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@
7676
//! signature of the function: it takes a generic `T::RuntimeOrigin` and returns a
7777
//! `Result<T::AccountId, _>`. So by the end of this function call, we know that this dispatchable
7878
//! was signed by `who`.
79-
#![doc = docify::embed!("../substrate/frame/system/src/lib.rs", ensure_signed)]
79+
#![doc = docify::embed!("../../substrate/frame/system/src/lib.rs", ensure_signed)]
8080
//!
8181
//!
8282
//! - Where does `mutate`, `get` and `insert` and other storage APIs come from? All of them are
8383
//! explained in the corresponding `type`, for example, for `Balances::<T>::insert`, you can look
8484
//! into [`frame::prelude::StorageMap::insert`].
8585
//!
8686
//! - The return type of all dispatchable functions is [`frame::prelude::DispatchResult`]:
87-
#![doc = docify::embed!("../substrate/frame/support/src/dispatch.rs", DispatchResult)]
87+
#![doc = docify::embed!("../../substrate/frame/support/src/dispatch.rs", DispatchResult)]
8888
//!
8989
//! Which is more or less a normal Rust `Result`, with a custom [`frame::prelude::DispatchError`] as
9090
//! the `Err` variant. We won't cover this error in detail here, but importantly you should know

developer-hub/src/lib.rs docs/sdk/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//! # Developer Hub
1+
//! # Polkadot SDK Docs
22
//!
3-
//! The Polkadot SDK Developer Hub.
3+
//! The Polkadot SDK Developer Documentation.
44
//!
55
//! This crate is a *minimal*, but *always-accurate* source of information for those wishing to
66
//! build on the Polkadot SDK.
@@ -22,7 +22,7 @@
2222
//! ## Information Architecture
2323
//!
2424
//! This section paints a picture over the high-level information architecture of this crate.
25-
#![doc = simple_mermaid::mermaid!("../../docs/mermaid/IA.mmd")]
25+
#![doc = simple_mermaid::mermaid!("../../mermaid/IA.mmd")]
2626
#![allow(rustdoc::invalid_html_tags)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
2727
#![allow(rustdoc::bare_urls)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
2828
#![warn(rustdoc::broken_intra_doc_links)]

0 commit comments

Comments
 (0)