Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ Thumbs.db
:Zone.Identifier
**/:Zone.Identifier
lychee*
_book/
_book_temp/
node_modules/
package-lock.json
.gitbook/cli/
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- [About this repo](#about-this-repo)
- [Contributing](#contributing)
- [Local Development](#local-development)
- [Link checking](#link-checking)
- [Issues](#issues)
- [Backlog](#backlog)
Expand All @@ -32,6 +33,47 @@ PRs also generate preview links so one can preview the site before merging. Per

Want to help out? Pull requests (PRs) are always welcome! If you want to help out but aren't sure where to start, check out the [issues board](https://github.com/filecoin-project/filecoin-docs/issues).

### Local Development

You can build and preview the documentation locally using the custom CLI wrapper. This setup automatically manages the legacy Node.js v10 environment required by GitBook.

#### Prerequisites

- [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager)

**macOS/Linux:**

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
```

**Windows:** Use [nvm-windows](https://github.com/coreybutler/nvm-windows) or WSL

#### Quick Start

1. **Setup**: Installs dependencies and prepares the environment.

```bash
npm run setup
```

2. **Develop**: Builds and serves the site with live reload.
```bash
npm run dev
```

#### Commands

| Command | Description |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| `npm run setup` | Installs dependencies and configures the legacy GitBook environment (runs automatically on first use) |
| `npm run dev` | Builds and serves the documentation with live reload (default port: 4003) |
| `npm run build` | Builds the static site to the `_book/` directory |
| `npm run preview` | Serves the existing `_book/` directory without rebuilding |
| `npm run stop` | Stops any running GitBook server instances |
| `npm run clean` | Removes build artifacts and dependencies |


### Link checking

Links are checked using [lychee-action](https://github.com/lycheeverse/lychee-action) as configured by [check-external-links.yml](.github/workflows/check-external-links.yml). Working links are required before merging. If you have a link that should be excluded from checking:
Expand Down
2 changes: 1 addition & 1 deletion basics/what-is-filecoin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-

<meta name="description" content="Introduction to Filecoin." />

# Introduction to Filecoin
## Introduction to Filecoin

Filecoin is a peer-to-peer network that enables reliable, decentralized file storage through built-in economic incentives and cryptographic proofs. Clients, or users, pay any number of storage providers, or data centers, to store the client's data --storage providers then provide cryptographic proofs daily as evidence to the clients that the data is still at the data center. Storage providers lock a certain amount of Filecoin as collateral --should they repeatedly fail to provide a proof, their collateral gets burned, serving as a strong deterrent from the data center losing the data.

Expand Down
7 changes: 7 additions & 0 deletions book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"gitbook": "3.2.3",
"plugins": ["filecoin"],
"structure": {
"readme": "WELCOME.md"
}
}
4 changes: 2 additions & 2 deletions networks/local-testnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ Before we can build the Lotus binaries, there’s some setup we need to do. We
This will output something like:\\

```plaintext
sector-id: {{1000 1} 5}, piece info: {2048 baga6ea4seaqf7ovs6euxa4ktencg2gza7lua32l2ugqu76uqgvnjocek6gtoufi}
2023-01-31T10:49:46.562-0400 WARN preseal seed/seed.go:175 PreCommitOutput: {{1000 1} 5} bagboea4b5abcamxkzmzcciabqqk3xuuvj3k23nfuojboopyw3kg2mblhj6mzipii baga6ea4seaqf7ovs6euxa4ktencg2gza7lua32l2ugqu76uqgvnjocek6gtoufi
sector-id: ({1000 1} 5), piece info: {2048 baga6ea4seaqf7ovs6euxa4ktencg2gza7lua32l2ugqu76uqgvnjocek6gtoufi}
2023-01-31T10:49:46.562-0400 WARN preseal seed/seed.go:175 PreCommitOutput: ({1000 1} 5) bagboea4b5abcamxkzmzcciabqqk3xuuvj3k23nfuojboopyw3kg2mblhj6mzipii baga6ea4seaqf7ovs6euxa4ktencg2gza7lua32l2ugqu76uqgvnjocek6gtoufi
2023-01-31T10:49:46.562-0400 WARN preseal seed/seed.go:100 PeerID not specified, generating dummy

...
Expand Down
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"main": "update-versions.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"update-versions": "node update-versions.js"
"setup": "npm install && gitbook-cli setup",
"build": "gitbook-cli build",
"dev": "gitbook-cli serve",
"preview": "gitbook-cli preview",
"build:verbose": "gitbook-cli build --verbose",
"dev:verbose": "gitbook-cli serve --verbose",
"preview:verbose": "gitbook-cli preview --verbose",
"stop": "gitbook-cli stop",
"help": "gitbook-cli help",
"clean": "rm -rf _book _book_temp node_modules package-lock.json"
},
"repository": {
"type": "git",
Expand All @@ -17,5 +26,8 @@
"bugs": {
"url": "https://github.com/filecoin-project/filecoin-docs/issues"
},
"homepage": "https://github.com/filecoin-project/filecoin-docs#readme"
"homepage": "https://github.com/filecoin-project/filecoin-docs#readme",
"devDependencies": {
"gitbook-plugin-filecoin": "^1.0.5"
}
}
Loading