diff --git a/.github/styles/pln-ignore.txt b/.github/styles/pln-ignore.txt index a4025c9ae..818634931 100644 --- a/.github/styles/pln-ignore.txt +++ b/.github/styles/pln-ignore.txt @@ -128,6 +128,7 @@ mainnet markdown(lint) markdownlint merkle +merklizing metadata('s) metamask minimalistic @@ -140,6 +141,7 @@ multiaddrs multibase multicast multicodec +multicodec(s) multiformats multihash multihashes @@ -217,6 +219,7 @@ trustlessly uncensorable undialable uniswap +unixfs unreachability untrusted upgradeability diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index b2f7b4978..81b596c8e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -255,12 +255,12 @@ module.exports = { ] }, { - title: 'IPFS in the browser', + title: 'IPFS on the web', sidebarDepth: 1, collapsable: true, children: [ + '/how-to/ipfs-in-web-apps', '/how-to/address-ipfs-on-web', - '/how-to/browser-tools-frameworks' ] }, { @@ -277,7 +277,7 @@ module.exports = { collapsable: true, children: [ '/how-to/gateway-best-practices', - '/how-to/gateway-troubleshooting' + '/how-to/gateway-troubleshooting', ] }, { diff --git a/docs/.vuepress/redirects b/docs/.vuepress/redirects index e2954dfd7..92b46067a 100644 --- a/docs/.vuepress/redirects +++ b/docs/.vuepress/redirects @@ -40,6 +40,7 @@ /guides/guides/addressing/ /how-to/address-ipfs-on-web /guides/guides/install/ /install /how-to/host-single-page-site /how-to/websites-on-ipfs/single-page-website +how-to/browser-tools-frameworks /how-to/ipfs-on-the-web/ /how-to/troubleshoot-file-transfers /how-to/troubleshooting /how-to/run-ipfs-inside-docker /install/run-ipfs-inside-docker /install/command-line-quick-start/ /how-to/command-line-quick-start diff --git a/docs/concepts/lifecycle.md b/docs/concepts/lifecycle.md index bd0b5af16..3834bd6ef 100644 --- a/docs/concepts/lifecycle.md +++ b/docs/concepts/lifecycle.md @@ -5,17 +5,18 @@ description: Learn about the lifecycle of data in IPFS. # The lifecycle of data in IPFS -- [1. Content-addressable representation](#1-content-addressable-representation) -- [2. Pinning](#2-pinning) -- [3. Retrieval](#3-retrieval) -- [4. Deleting](#4-deleting) +- [1. Content-addressing](#1-content-addressing) +- [2. Providing](#2-providing) +- [3. Retrieving](#3-retrieving) - [Learn more](#learn-more) -## 1. Content-addressable representation +## 1. Content-addressing / Merkelizing -The file is transformed into a content-addressable representation using a CID. The basic idea is that this representation makes files and directories **content-addressable** via CIDs by chunking files into smaller blocks, calculating their hashes, and constructing a [Merkle DAG](./merkle-dag.md). +The first stage in the lifecycle of data in IPFS is to address it by CID. This is a local operation that takes arbitrary data and encodes it so it can be addressed by a CID. -## 2. Pinning +The exact process depends on the type of data. For files and directories, this is done by constructing a [UnixFS](./file-systems.md#unix-file-system-unixfs) [Merkle DAG](./merkle-dag.md). For other data types, such as dag-cbor, this is done by encoding the data with [dag-cbor](https://ipld.io/docs/codecs/known/dag-cbor/) which is hashed to produce a CID. + +## 2. Providing In this stage, the blocks of the CID are saved on an IPFS node (or pinning service) and made retrievable to the network. Simply saving the CID on the node does not mean the CID is retrievable, so pinning must be used. Pinning allows the node to advertise that it has the CID, and provide it to the network. @@ -23,7 +24,7 @@ In this stage, the blocks of the CID are saved on an IPFS node (or pinning servi - **Providing:** The content-addressable representation of the CID is persisted on one of web3.storage's IPFS nodes (servers running an IPFS node) and made publicly available to the IPFS network. -## 3. Retrieval +## 3. Retrieving In this stage, an IPFS node fetches the blocks of the CID and constructs the Merkle DAG. This usually involves several steps: @@ -35,13 +36,13 @@ In this stage, an IPFS node fetches the blocks of the CID and constructs the Mer - **Local access:** Once all blocks are present, the Merkle DAG can be constructed, making the file or directory underlying the CID successfully replicated and accessible. -## 4. Deleting + ## Learn more diff --git a/docs/how-to/browser-tools-frameworks.md b/docs/how-to/browser-tools-frameworks.md deleted file mode 100644 index 9ed1e49d7..000000000 --- a/docs/how-to/browser-tools-frameworks.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Browser tools and frameworks -description: Information on how to use IPFS in combination with your favorite frameworks or browser implementation tools. ---- - -# Browser Tools and Frameworks - -Want to learn how to use IPFS in combination with your favorite framework or browser implementation tool? See below for some common examples, including hints and boilerplate code. Don't see your framework or tool of choice here? Let us know by [filing an issue](https://github.com/ipfs/ipfs-docs/issues/new?assignees=&labels=OKR+3%3A+Content+Improvement%2C+docs-ipfs&template=content-request.md&title=%5BCONTENT+REQUEST%5D+%20Browser%20Implementation%20Tools%20and%20Frameworks) in the IPFS docs GitHub repo. - -## Browserify - -[Example and boilerplate](https://github.com/ipfs-examples/js-ipfs-browser-browserify) you can use to guide yourself into bundling js-ipfs with browserify, so that you can use it in your own web app. - -## Parcel.js - -[Example and boilerplate application](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/browser-parceljs) that connects to IPFS using js-ipfs and is bundled with Parcel.js, so that you can follow it for creating Parcel.js bundled js-ipfs dapps. - -## Vue - -[Minimal demonstration](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/browser-vue) of how to use js-ipfs with Vue. - -## Webpack - -[Example and boilerplate](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/browser-webpack) you can use to guide yourself into bundling js-ipfs with webpack, so that you can use it in your own web app. - -## With a `