From aea6d7f48679f31814b1905e72c8f1ca97d5f917 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:05:58 -0300 Subject: [PATCH] fix(devx): Unified all documentation links to docs.iota.org (#4013) * fix(devx): use docs.iota.org for all Move doc links, and fix all absolute links * fix(devx): use https * Update docs/README.md * dprint --- crates/iota-indexer/README.md | 2 +- crates/iota-json-rpc-api/src/indexer.rs | 4 ++-- crates/iota-json-rpc-api/src/transaction_builder.rs | 2 +- crates/iota-open-rpc/spec/openrpc.json | 6 +++--- crates/iota-sdk/README.md | 4 ++-- crates/iota-storage/src/object_store/http/mod.rs | 2 +- docs/README.md | 6 +++--- docs/content/references/contribute/code-of-conduct.mdx | 1 - .../references/contribute/contribute-to-iota-repos.mdx | 3 +-- docs/content/references/contribute/style-guide.mdx | 3 +-- docs/content/sidebars/references.js | 1 + scripts/slipstream/config_slipstream.json | 10 +++++----- sdk/typescript/src/client/types/params.ts | 6 +++--- 13 files changed, 24 insertions(+), 26 deletions(-) diff --git a/crates/iota-indexer/README.md b/crates/iota-indexer/README.md index 929c89f1f41..b7126faad67 100644 --- a/crates/iota-indexer/README.md +++ b/crates/iota-indexer/README.md @@ -66,7 +66,7 @@ To run the indexer as a standalone service with an existing fullnode, follow the cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://fullnode.devnet.iota.io:443" --fullnode-sync-worker --reset-db ``` -- to run indexer as a reader which exposes a JSON RPC service with following [APIs](https://docs.iota.io/iota-api-ref). +- to run indexer as a reader which exposes a JSON RPC service with following [APIs](https://docs.iota.org/iota-api-ref). ``` cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://fullnode.devnet.iota.io:443" --rpc-server-worker diff --git a/crates/iota-json-rpc-api/src/indexer.rs b/crates/iota-json-rpc-api/src/indexer.rs index 25bfaf5eb59..b77ab45d2d6 100644 --- a/crates/iota-json-rpc-api/src/indexer.rs +++ b/crates/iota-json-rpc-api/src/indexer.rs @@ -63,7 +63,7 @@ pub trait IndexerApi { #[method(name = "queryEvents")] async fn query_events( &self, - /// The event query criteria. See [Event filter](https://docs.iota.io/build/event_api#event-filters) documentation for examples. + /// The event query criteria. See [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) documentation for examples. query: EventFilter, /// optional paging cursor cursor: Option, @@ -78,7 +78,7 @@ pub trait IndexerApi { #[subscription(name = "subscribeEvent", item = IotaEvent)] fn subscribe_event( &self, - /// The filter criteria of the event stream. See [Event filter](https://docs.iota.io/build/event_api#event-filters) documentation for examples. + /// The filter criteria of the event stream. See [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) documentation for examples. filter: EventFilter, ) -> SubscriptionResult; diff --git a/crates/iota-json-rpc-api/src/transaction_builder.rs b/crates/iota-json-rpc-api/src/transaction_builder.rs index 066941ac720..eb2019ae1d9 100644 --- a/crates/iota-json-rpc-api/src/transaction_builder.rs +++ b/crates/iota-json-rpc-api/src/transaction_builder.rs @@ -138,7 +138,7 @@ pub trait TransactionBuilder { function: String, /// the type arguments of the Move function type_arguments: Vec, - /// the arguments to be passed into the Move function, in [IotaJson](https://docs.iota.io/build/iota-json) format + /// the arguments to be passed into the Move function, in [IotaJson](https://docs.iota.org/references/iota-api) format arguments: Vec, /// gas object to be used in this transaction, node will pick one from the signer's possession if not provided gas: Option, diff --git a/crates/iota-open-rpc/spec/openrpc.json b/crates/iota-open-rpc/spec/openrpc.json index 89343df8e73..dfcd4ecccc2 100644 --- a/crates/iota-open-rpc/spec/openrpc.json +++ b/crates/iota-open-rpc/spec/openrpc.json @@ -4461,7 +4461,7 @@ "params": [ { "name": "query", - "description": "The event query criteria. See [Event filter](https://docs.iota.io/build/event_api#event-filters) documentation for examples.", + "description": "The event query criteria. See [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) documentation for examples.", "required": true, "schema": { "$ref": "#/components/schemas/EventFilter" @@ -4705,7 +4705,7 @@ "params": [ { "name": "filter", - "description": "The filter criteria of the event stream. See [Event filter](https://docs.iota.io/build/event_api#event-filters) documentation for examples.", + "description": "The filter criteria of the event stream. See [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) documentation for examples.", "required": true, "schema": { "$ref": "#/components/schemas/EventFilter" @@ -4921,7 +4921,7 @@ }, { "name": "arguments", - "description": "the arguments to be passed into the Move function, in [IotaJson](https://docs.iota.io/build/iota-json) format", + "description": "the arguments to be passed into the Move function, in [IotaJson](https://docs.iota.org/references/iota-api) format", "required": true, "schema": { "type": "array", diff --git a/crates/iota-sdk/README.md b/crates/iota-sdk/README.md index 843b15fe901..9c98c127ceb 100644 --- a/crates/iota-sdk/README.md +++ b/crates/iota-sdk/README.md @@ -59,7 +59,7 @@ Unless otherwise specified, most of these examples assume `Rust` and `cargo` are In the root folder of the `iota` repository (or in the `iota-sdk` crate folder), you can individually run examples using the command `cargo run --example filename` (without `.rs` extension). For example: -- `cargo run --example iota_client` -- this one requires a local Iota network running (see [#Connecting to Iota Network](https://docs.iota.org/developer/getting-started/local-network#start-a-local-network). If you do not have a local Iota network running, please skip this example. +- `cargo run --example iota_client` -- this one requires a local Iota network running (see [#Connecting to Iota Network](https://docs.iota.org/developer/getting-started/local-network#start-the-local-network). If you do not have a local Iota network running, please skip this example. - `cargo run --example coin_read_api` - `cargo run --example event_api` -- note that this will subscribe to a stream and thus the program will not terminate unless forced (Ctrl+C) - `cargo run --example governance_api` @@ -80,7 +80,7 @@ The `IotaClientBuilder` struct provides a connection to the JSON-RPC server that For all available servers, see [here](https://docs.iota.org/developer/network-overview). -For running a local IOTA network, please follow [this guide](https://docs.iota.org/developer/getting-started/install-iota) for installing IOTA and [this guide](https://docs.iota.org/developer/getting-started/local-network#start-a-local-network) for starting the local IOTA network. +For running a local IOTA network, please follow [this guide](https://docs.iota.org/developer/getting-started/install-iota) for installing IOTA and [this guide](https://docs.iota.org/developer/getting-started/local-network#start-the-local-network) for starting the local IOTA network. ```rust use iota_sdk::IotaClientBuilder; diff --git a/crates/iota-storage/src/object_store/http/mod.rs b/crates/iota-storage/src/object_store/http/mod.rs index 678afd64a55..0f750a7193e 100644 --- a/crates/iota-storage/src/object_store/http/mod.rs +++ b/crates/iota-storage/src/object_store/http/mod.rs @@ -23,7 +23,7 @@ use crate::object_store::{ http::{gcs::GoogleCloudStorage, local::LocalStorage, s3::AmazonS3}, }; -// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html +// https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html // // Do not URI-encode any of the unreserved characters that RFC 3986 defines: // A-Z, a-z, 0-9, hyphen ( - ), underscore ( _ ), period ( . ), and tilde ( ~ ). diff --git a/docs/README.md b/docs/README.md index 63ade6b76f9..7bf8398b94f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,9 +39,9 @@ If you'd like to view the Vercel preview before your changes are ready for revie IOTA is for the community. Contribute for the benefit of all. - [Docs contributing guidelines](https://docs.iota.org/references/contribute/contribution-process) -- [Repo contributing guidelines](https://github.com/iotaledger/iota/blob/develop/CONTRIBUTING.md) -- [Style guide](https://docs.iota.org/style-guide) -- [Code of conduct](https://docs.iota.org/code-of-conduct) +- [Repo contributing guidelines](https://docs.iota.org/references/contribute/contribute-to-iota-repos) +- [Style guide](https://docs.iota.org/references/contribute/style-guide) +- [Code of conduct](https://docs.iota.org/references/contribute/code-of-conduct) ## License diff --git a/docs/content/references/contribute/code-of-conduct.mdx b/docs/content/references/contribute/code-of-conduct.mdx index 6df1fa741ca..4ad6e21fbab 100644 --- a/docs/content/references/contribute/code-of-conduct.mdx +++ b/docs/content/references/contribute/code-of-conduct.mdx @@ -1,7 +1,6 @@ --- title: IOTA Contributor Covenant Code of Conduct sidebar_label: Code of Conduct -slug: /code-of-conduct --- IOTA, as an open-source project, encourages free discussion rooted in respect. diff --git a/docs/content/references/contribute/contribute-to-iota-repos.mdx b/docs/content/references/contribute/contribute-to-iota-repos.mdx index 16ff7ea9c3f..638268b7ea4 100644 --- a/docs/content/references/contribute/contribute-to-iota-repos.mdx +++ b/docs/content/references/contribute/contribute-to-iota-repos.mdx @@ -1,6 +1,5 @@ --- title: Contribute to IOTA Repositories -slug: /contribute-to-iota-repos --- This page describes how to contribute to IOTA, and provides additional information about participating in the IOTA community. @@ -13,7 +12,7 @@ To connect with the IOTA community, join our [Discord](https://discord.gg/iota). To report an issue with IOTA, [create an issue](https://github.com/iotaledger/iota/issues/new/choose) in the GitHub repo. Click **Get started** to open a template for the type of issue to create. -## Fork IOTA to contribute +## Fork IOTA to Contribute To contribute to IOTA source code or documentation, you need only a GitHub account. You can commit updates and then submit a PR directly from the Github website, or create a fork of the repo to your local environment and use your favorite tools to make changes. Always submit PRs to the `main` branch. diff --git a/docs/content/references/contribute/style-guide.mdx b/docs/content/references/contribute/style-guide.mdx index 04b796051fe..ab4a8b6ad80 100644 --- a/docs/content/references/contribute/style-guide.mdx +++ b/docs/content/references/contribute/style-guide.mdx @@ -1,6 +1,5 @@ --- title: Style Guide -slug: /style-guide toc_max_heading_level: 2 --- @@ -556,7 +555,7 @@ Measurements should be written as numerals. ## Links -Always use relative links when linking to topics on docspnpm .iota.org. +Always use relative links when linking to topics on docs.iota.org. Include the `.mdx` extension when creating internal links so that they also work from the source file in GitHub. diff --git a/docs/content/sidebars/references.js b/docs/content/sidebars/references.js index 2b4673f258f..b62046a7b54 100644 --- a/docs/content/sidebars/references.js +++ b/docs/content/sidebars/references.js @@ -93,6 +93,7 @@ const references = [ items: [ 'references/contribute/contribution-process', 'references/contribute/code-of-conduct', + 'references/contribute/contribute-to-iota-repos', 'references/contribute/style-guide', 'references/contribute/add-a-quiz', 'references/contribute/import-code-docs', diff --git a/scripts/slipstream/config_slipstream.json b/scripts/slipstream/config_slipstream.json index 97ea0270f2c..1be88eb7763 100644 --- a/scripts/slipstream/config_slipstream.json +++ b/scripts/slipstream/config_slipstream.json @@ -159,7 +159,7 @@ }, { "regex": "docs\\.[Mm]ysten[Ll]abs\\.com", - "replacement": "wiki.iota.org" + "replacement": "docs.iota.org" }, { "regex": "\\{\\`\\$\\{new Date\\(\\)\\.getFullYear\\(\\)\\}\\s+Mysten\\s+Labs\\.\\s+All\\s+rights\\s+reserved\\.\\`\\}", @@ -203,15 +203,15 @@ }, { "regex": "sdk\\.[Mm]ysten[Ll]abs\\.com\/typescript", - "replacement": "wiki.iota.org/references/ts-sdk/typescript" + "replacement": "docs.iota.org/references/ts-sdk/typescript" }, { "regex": "sdk\\.[Mm]ysten[Ll]abs\\.com\/", - "replacement": "wiki.iota.org/references/ts-sdk/" + "replacement": "docs.iota.org/references/ts-sdk/" }, { "regex": "sdk\\.[Mm]ysten[Ll]abs\\.com", - "replacement": "wiki.iota.org/references/ts-sdk/typescript" + "replacement": "docs.iota.org/references/ts-sdk/typescript" }, { "regex": "[Mm]ysten[Ll]abs\\.com", @@ -243,7 +243,7 @@ }, { "regex": "docs\\.sui\\.io", - "replacement": "wiki.iota.org" + "replacement": "docs.iota.org" }, { "regex": "suiexplorer\\.com", diff --git a/sdk/typescript/src/client/types/params.ts b/sdk/typescript/src/client/types/params.ts index 62f7262f553..feb1c6ccf3c 100644 --- a/sdk/typescript/src/client/types/params.ts +++ b/sdk/typescript/src/client/types/params.ts @@ -326,7 +326,7 @@ export interface GetValidatorsApyParams {} /** Return list of events for a specified query criteria. */ export interface QueryEventsParams { /** - * The event query criteria. See [Event filter](https://docs.iota.io/build/event_api#event-filters) + * The event query criteria. See [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) * documentation for examples. */ query: RpcTypes.IotaEventFilter; @@ -353,7 +353,7 @@ export type QueryTransactionBlocksParams = { export interface SubscribeEventParams { /** * The filter criteria of the event stream. See - * [Event filter](https://docs.iota.io/build/event_api#event-filters) documentation for examples. + * [Event filter](https://docs.iota.org/developer/iota-101/using-events#applying-event-filters) documentation for examples. */ filter: RpcTypes.IotaEventFilter; } @@ -413,7 +413,7 @@ export interface UnsafeMoveCallParams { typeArguments: string[]; /** * the arguments to be passed into the Move function, in - * [IotaJson](https://docs.iota.io/build/iota-json) format + * [IotaJson](https://docs.iota.org/references/iota-api) format */ arguments: unknown[]; /**