Skip to content

Commit 472f107

Browse files
authored
Merge pull request #1490 from ipfs/publish-guide
Publish with IPFS using a pinning service guide
2 parents c6bc27f + bf7c9ce commit 472f107

15 files changed

+302
-10
lines changed

docs/.vuepress/config.js

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ const DEPLOY_DOMAIN = 'https://docs.ipfs.tech'
44
const SPEEDCURVE_ID = process.env.SPEEDCURVE_ID || ''
55
const pageSuffix = '/'
66

7+
const installMenuChildren = [
8+
['/install/command-line','IPFS Kubo for Go'],
9+
['/install/run-ipfs-inside-docker', 'IPFS Kubo in Docker'],
10+
['/install/js-ipfs','IPFS for JavaScript'],
11+
['https://iroh.computer/docs/install/', "IPFS Iroh for Rust"],
12+
['/install/ipfs-desktop', 'IPFS Desktop App'],
13+
['/install/ipfs-companion', 'IPFS Companion Browser Extension'],
14+
['/install/server-infrastructure', 'IPFS Cluster']
15+
]
16+
717
module.exports = {
818
base: '/',
919
head: require('./head'),
@@ -82,20 +92,39 @@ module.exports = {
8292
sidebar: {
8393
'/install/': [
8494
['/concepts/what-is-ipfs','Basic Concepts'],
95+
{
96+
title: 'Quickstart',
97+
sidebarDepth: 1,
98+
collapsable: false,
99+
children: [
100+
['/quickstart/publish','Publish with IPFS'],
101+
['/quickstart/retrieve','Retrieve with IPFS'],
102+
]
103+
},
85104
{
86105
title: 'Install',
87106
sidebarDepth: 1,
88107
collapsable: false,
108+
children: installMenuChildren
109+
},
110+
],
111+
'/quickstart/': [
112+
['/concepts/what-is-ipfs','Basic Concepts'],
113+
{
114+
title: 'Quickstart',
115+
sidebarDepth: 1,
116+
collapsable: false,
89117
children: [
90-
['/install/command-line','IPFS Kubo for Go'],
91-
['/install/run-ipfs-inside-docker', 'IPFS Kubo in Docker'],
92-
['/install/js-ipfs','IPFS for JavaScript'],
93-
['https://iroh.computer/docs/install/', "IPFS Iroh for Rust"],
94-
['/install/ipfs-desktop', 'IPFS Desktop App'],
95-
['/install/ipfs-companion', 'IPFS Companion Browser Extension'],
96-
['/install/server-infrastructure', 'IPFS Cluster']
118+
['/quickstart/publish','Publish with IPFS'],
119+
['/quickstart/retrieve','Retrieve with IPFS'],
97120
]
98121
},
122+
{
123+
title: 'Install',
124+
sidebarDepth: 1,
125+
collapsable: false,
126+
children: installMenuChildren
127+
},
99128
],
100129
'/concepts/': [
101130
{
@@ -113,6 +142,7 @@ module.exports = {
113142
sidebarDepth: 1,
114143
collapsable: true,
115144
children: [
145+
'/concepts/lifecycle',
116146
'/concepts/hashing',
117147
'/concepts/immutability',
118148
'/concepts/persistence',
Loading

docs/concepts/content-addressing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about how content addressing works and how content identifier
55

66
# Content Identifiers (CIDs)
77

8-
As described in [IPFS and the problems it solves](../concepts/what-is-ipfs.md), IPFS is a modular suite of protocols purpose built for the organization and movement of <VueCustomTooltip label="A way to address data by its hash rather than its location (IPs)." underlined multiline>content-addressed data</VueCustomTooltip>. In this guide, you'll learn more about the fundamentals of content-addressing in IPFS and how IPFS uses Content Identifiers (CIDs) to handle content-addressed data.
8+
As described in [IPFS and the problems it solves](../concepts/what-is-ipfs.md), IPFS is a modular suite of protocols purpose built for the organization and transfer of <VueCustomTooltip label="A way to address data by its hash rather than its location (IPs)." underlined multiline>content-addressed data</VueCustomTooltip>. In this guide, you'll learn more about the fundamentals of content-addressing in IPFS and how IPFS uses Content Identifiers (CIDs) to handle content-addressed data.
99

1010
## What is a CID?
1111

@@ -33,7 +33,7 @@ CIDs contain the hash and the codec of the data. A CID can be represented in str
3333
While a data block's CID is constructed using the cryptographic hash of the data block, a CID contains additional information (described above) that the hash does not. For further information, see [CIDs are not file hashes](#cids-are-not-file-hashes) below.
3434
:::
3535

36-
For a break-down of an actual CID, see [this example with the IPFS CID inspector](https://cid.ipfs.tech/#QmcRD4wkPPi6dig81r5sLj9Zm1gDCL4zgpEj9CfuRrGbzF).
36+
For a break-down of an actual CID, see [this example with the IPFS CID inspector](https://cid.ipfs.tech/#bafybeigrf2dwtpjkiovnigysyto3d55opf6qkdikx6d65onrqnfzwgdkfa).
3737

3838
## CIDs are not file hashes
3939

docs/concepts/lifecycle.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: The lifecycle of data in IPFS
3+
description: Learn about the lifecycle of data in IPFS.
4+
---
5+
6+
# The lifecycle of data in IPFS
7+
8+
- [1. Content-addressable representation](#1-content-addressable-representation)
9+
- [2. Pinning](#2-pinning)
10+
- [3. Retrieval](#3-retrieval)
11+
- [4. Deleting](#4-deleting)
12+
- [Learn more](#learn-more)
13+
14+
## 1. Content-addressable representation
15+
16+
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).
17+
18+
## 2. Pinning
19+
20+
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.
21+
22+
- **Advertising:** In this step, a CID is made discoverable to the IPFS network by advertising a record linking the CID and the server's IP address to the [DHT](./dht.md). Advertising is a continuous process that repeats typically every 12 hours. The term **publishing** is also commonly used to refer to this step.
23+
24+
- **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.
25+
26+
## 3. Retrieval
27+
28+
In this stage, an IPFS node fetches the blocks of the CID and constructs the Merkle DAG. This usually involves several steps:
29+
30+
- **Content routing:** The IPFS node finds other IPFS nodes providing the CIDs you are requesting. Content routing is facilitated by either the [DHT](./dht.md), asking already connected peers over [Bitswap](./bitswap.md), or making an HTTP call to a [delegated routing](https://github.com/ipfs/specs/blob/main/IPIP/0337-delegated-routing-http-api.md) server like the [network indexer](https://cid.contact/). The term **content discovery** is also commonly used to refer to this step.
31+
32+
- **Block fetching:** An IPFS node fetches the blocks of the Merkle DAG (of the file or folder) from providers.
33+
34+
- **Verification:** The IPFS node verifies the blocks fetched by hashing them and ensuring that the resulting hash is correct. Note that this type of retrieval is _trustless_; that is, blocks can come from any node in the network.
35+
36+
- **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.
37+
38+
## 4. Deleting
39+
40+
At this point, the blocks associated with a CID are deleted from a node. **Deletion is always a local operation**. If a CID has been replicated to other nodes, it will continue to be available on the IPFS network.
41+
42+
:::callout
43+
Once the CID is replicated by another node, it is typically advertised to DHT by default, even if it isn't explicitly pinned.
44+
:::
45+
46+
## Learn more
47+
48+
Learn more about the lifecycle of data in IPFS in the following video:
49+
50+
@[youtube](iaVXRPsRCUc)

docs/install/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ description: There are several different ways you can install and interact with
55

66
# Get Started
77

8-
IPFS is a collection of protocols, packages, and specifications that allow computers to send and receive data. Because of this, users can pick and choose which packages to install when using IPFS. And like shoe sizes, there is no _one-size-fits-all_ solution. A developer building network applications will install a different set of tools than someone who wants to store files on IPFS. Pick the one that best suits what you're here to do.
8+
IPFS is a collection of protocols, packages, and specifications that allow computers to send and receive data. Because of this, users can interact with and use IPFS in many different ways. A developer building network applications will use a different set of tools to interact with IPFS than than someone who wants to store files on IPFS. Pick the one that best suits what you're here to do.
9+
10+
## Publish files with a pinning service
11+
12+
Do you want to quickly and easily publish content with IPFS without complex tools? See the [Publish with IPFS quickstart](../quickstart/publish.md), where you'll learn how to use pinning services to pin files to the IPFS network.
913

1014
## IPFS Desktop
1115

465 KB
Loading

docs/quickstart/images/gateway.png

95.5 KB
Loading
371 KB
Loading
Loading
17.2 KB
Loading

0 commit comments

Comments
 (0)