Skip to content

Commit b117a35

Browse files
authored
Merge pull request #119 from filecoin-project/feat/117
feat: automate checks for 404 links
2 parents 6743393 + 0b1fb47 commit b117a35

File tree

15 files changed

+82
-31
lines changed

15 files changed

+82
-31
lines changed

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ module.exports = {
311311
baseURL: DEPLOY_DOMAIN
312312
}
313313
],
314+
'vuepress-plugin-check-md',
314315
'vuepress-plugin-ipfs'
315316
],
316317
extraWatchFiles: ['.vuepress/nav/en.js']

docs/build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Read the resources in the **Start Building** section before you begin for helpfu
2626

2727
- [Meme Marketplace](./examples/meme-marketplace/overview/): An example application built on Textile Hub, a Filecoin-backed IPFS Pinning Service.
2828
- [Simple Pinning Service](./examples/simple-pinning-service/overview/): An example application built on Powergate.
29-
- [Slate](./examples/filecoin-gui/overview/): A production application built on Powergate.
29+
- [Slate](./examples/slate/overview/): A production application built on Powergate.
3030
- [Network Inspector](./examples/network-inspector/overview/): An example application built on lotus.
3131

3232
Please suggest any additional content that you would find useful using the links below.

docs/build/core-products/protocol-implementations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If interacting with the implementation’s RPC APIs, the general development pat
4949
Filecoin protocol implementations provide access to core Filecoin protocol workflows, with very few abstractions of the core concepts. This can be very useful, as it allows flexibility and precision in interacting with Filecoin network functionality. However, integrating nodes directly can require greater familiarity with how Filecoin works. To learn more about the various workflows enabled by the core Filecoin protocol, check-out the [How-tos](../../how-to).
5050

5151
::: tip
52-
See a walkthrough of an end-to-end example application (the Filecoin Network Inspector) built using Lotus’ JS API client [here](../../examples/network-inspector/overview).
52+
See a walkthrough of an end-to-end example application (the Filecoin Network Inspector) built using [Lotus’ JS API client](../examples/network-inspector/overview).
5353
:::
5454

5555
## Resources

docs/build/examples/sample-architectures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ description: Learn how you might build an app on top of Filecoin.
77

88
No matter what you wish to build on Filecoin, you'll generally need a few basic elements:
99

10-
- **A node.** Each Filecoin-based service or application will need to use at least one Filecoin node that maintains consensus. All interactions with the network must flow through an up-to-date node: sending and receiving market deals, sending and receiving data, and more. You can host this yourself, or choose a [hosted node](/build/start-building/interacting-with-the-network/) option.
11-
- **An API.** Depending on language, and your preference for more granular or high-level commands, you can either directly use the node's go RPC API, or use one of the available [JS API client libraries](/build/developer-tools/wallets-signing-tools-api-clients/#api-clients).
10+
- **A node.** Each Filecoin-based service or application will need to use at least one Filecoin node that maintains consensus. All interactions with the network must flow through an up-to-date node: sending and receiving market deals, sending and receiving data, and more. You can host this yourself, or choose a [hosted node](../start-building/interacting-with-the-network/) option.
11+
- **An API.** Depending on language, and your preference for more granular or high-level commands, you can either directly use the node's go RPC API, or use one of the available [JS API client libraries](../developer-tools/wallets-signing-tools-api-clients/#api-clients).
1212
- Optional: Additional helper tools and libraries to simplify functions such as storage commands, managing deals, and more.
1313

1414
### Examples

docs/community/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Filecoin is home to a vibrant, diverse community of thousands of contributors an
99

1010
## Ways to contribute
1111

12-
No matter your area of specialty or level of expertise, there are many [ways to contribute](/community/contribute/ways-to-contribute/) to Filecoin and make a real difference in the Filecoin community at large.
12+
No matter your area of specialty or level of expertise, there are many [ways to contribute](./contribute/ways-to-contribute/) to Filecoin and make a real difference in the Filecoin community at large.
1313

1414
## Filecoin forums
1515

docs/community/contribute/contribution-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Contribute to Filecoin documentation by finding issues, fixing them
55

66
# Contribution tutorial
77

8-
While the [grammar, formatting, and style](/community/contribute/grammar-formatting-and-style/) and the [writing guide](/community/contribute/writing-guide/) can both help you write excellent content for the Filecoin Docs project, they don't delve into how you can actually submit you content changes. This guide will walk you through finding an issue, fixing it, and then submitting your fix to the `filecoin-project/filecoin-docs` project.
8+
While the [grammar, formatting, and style](./grammar-formatting-and-style) and the [writing guide](./writing-guide) can both help you write excellent content for the Filecoin Docs project, they don't delve into how you can actually submit you content changes. This guide will walk you through finding an issue, fixing it, and then submitting your fix to the `filecoin-project/filecoin-docs` project.
99

1010
There are plenty of small-sized issues around Filecoin documentation that make for easy, helpful contributions to the Filecoin project. Here, we'll walk through:
1111

docs/community/contribute/grammar-formatting-and-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn the syntax and formatting rules for writing documentation for
55

66
# Grammar, formatting, and style
77

8-
This page details the syntax and formatting rules for writing Filecoin documentation. For more conceptual ideas of writing, check out the [writing guide](/community/contribute/writing-guide/).
8+
This page details the syntax and formatting rules for writing Filecoin documentation. For more conceptual ideas of writing, check out the [writing guide](./writing-guide).
99

1010
## Grammar and spelling
1111

docs/community/contribute/ways-to-contribute.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Filecoin is a huge project and undertaking, and with lots of code comes the need
3030

3131
Before contributing to the Filecoin docs, please read these quick guides; they'll save you time and help keep the docs accurate and consistent!
3232

33-
1. [Style and formatting guide](/community/contribute/grammar-formatting-and-style/)
34-
2. [Writing guide](/community/contribute/writing-guide/)
33+
1. [Style and formatting guide](./grammar-formatting-and-style)
34+
2. [Writing guide](./writing-guide)
3535

36-
If you have never contributed to an open-source project before, or just need a refresher, take a look at the [contribution tutorial](/community/contribute/contribution-tutorial/).
36+
If you have never contributed to an open-source project before, or just need a refresher, take a look at the [contribution tutorial](./contribution-tutorial).
3737

3838
### Community
3939

40-
If interacting with people is your favorite thing to do in this world, join the [Filecoin chat and discussion forums](community/chat-and-discussion-forums/) to say hello, meet others who share your goals, and connect with other members of the community.
40+
If interacting with people is your favorite thing to do in this world, join the [Filecoin chat and discussion forums](../chat-and-discussion-forums) to say hello, meet others who share your goals, and connect with other members of the community.
4141

4242
### Build Applications
4343

docs/community/contribute/writing-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn the specifics of how to write documentation for the Filecoin
55

66
# Writing guide
77

8-
This guide explains how to write an article. While the [grammar, formatting, and style guide](/community/contribute/grammar-formatting-and-style/) lets you know the rules you should follow, this guide will help you to properly structure your writing and choose the correct tone for your audience.
8+
This guide explains how to write an article. While the [grammar, formatting, and style guide](./grammar-formatting-and-style) lets you know the rules you should follow, this guide will help you to properly structure your writing and choose the correct tone for your audience.
99

1010
## Walkthroughs
1111

@@ -17,7 +17,7 @@ The vast majority of documentation within the Filecoin Docs project falls under
1717

1818
Use the following goals when writing walkthroughs:
1919

20-
| Goal | Keyword | Explanation |
20+
| Goal | Keyword | Explanation |
2121
| ------------- | ----------- | ----------------------------------------------------------------- |
2222
| **Audience** | _General_ | Easy for anyone to read with minimal effort. |
2323
| **Formality** | _Neutral_ | Slang is restricted, but standard casual expressions are allowed. |
@@ -53,7 +53,7 @@ These articles are vastly different in tone when compared to walkthroughs. Some
5353

5454
Use the following goals when writing conceptual articles:
5555

56-
| Goal | Keyword | Explanation |
56+
| Goal | Keyword | Explanation |
5757
| ------------- | ------------------------ | -------------------------------------------------------------------------------- |
5858
| **Audience** | _Knowledgeable_ | Requires a certain amount of focus to understand. |
5959
| **Formality** | _Neutral_ | Slang is restricted, but standard casual expressions are allowed. |
@@ -79,7 +79,7 @@ Take the hypothetical tutorial _Get up and running with Filecoin_, for example.
7979

8080
1. A brief introduction to what Filecoin is.
8181
2. Choose and install a command line client.
82-
3. Understanding storage deals.
82+
3. Understanding storage deals.
8383
4. Import and store a file.
8484

8585
Pages `1` and `3` are conceptual articles, describing particular design patterns and ideas to the reader. All the other pages are walkthroughs instructing the user how to perform one specific action.

docs/how-to/store/large-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Filecoin can store any file format, but for very large files we recommend using
1515

1616
### Maximizing storage
1717

18-
The [simple recommendation](<(/how-to/store-prepare-data)>) is that files must be smaller than a sector. Colloquially, we refer to sectors as 1MB, 32GB, etc. To fully maximize storage usage, chunks can be fractionally larger. This is due to a combination of quirks:
18+
The [simple recommendation](./prepare-data) is that files must be smaller than a sector. Colloquially, we refer to sectors as 1MB, 32GB, etc. To fully maximize storage usage, chunks can be fractionally larger. This is due to a combination of quirks:
1919

2020
- **Binary size:** Filecoin uses base 2 (binary) sizes. A "1MB sector" is actually 1MiB, or 1,048,576 bytes not 1,000,000 bytes.
2121
- **Padding:** For every 256 bits, subtract 2 bits (used by the Proofs processes). The remainder, 254 bits, is the usable storage space.

docs/how-to/store/prepare-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ Block data structures must be serialized into flat string files before importing
2525

2626
For simple operations, you can use the `split` or `zip` Unix commands. Or, choose a client application that handles data preparation for you, such as the [Starling Storage CLI & REST API](https://github.com/filecoin-project/starling).
2727

28-
Note: See [Very Large Files](/how-to/store-large-files) if you plan to store files larger than 1TB.
28+
Note: See [Very Large Files](./large-files) if you plan to store files larger than 1TB.

docs/mine/mining.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Mining in Filecoin works quite differently however -- instead of contributing co
1313

1414
The Filecoin network will have multiple types of miners:
1515

16-
* Storage miners, responsible for storing files and data on the network.
17-
* Retrieval miners, responsible for providing quick pipes to retrieve files.
18-
* Repair miners, which are to be implemented.
16+
- Storage miners, responsible for storing files and data on the network.
17+
- Retrieval miners, responsible for providing quick pipes to retrieve files.
18+
- Repair miners, which are to be implemented.
1919

2020
**Storage miners** are the heart of the network. They earn Filecoin by storing data for clients, and computing cryptographic proofs to verify storage across time. The probability of earning the block reward and transaction fees is proportional to the amount of storage the miner contributes to the Filecoin network, and not hashing power.
2121

@@ -27,10 +27,10 @@ In the current implementation, the focus is mostly on storage miners, which sell
2727

2828
The current recommended system specifications for operating a storage miner are:
2929

30-
* An 8+ core CPU
31-
* A NVIDIA-manufactured GPU chip (to be expanded on)
32-
* A dedicated SSD to act as a large cache store (512GB+)
33-
* A large amount of RAM for computing data replication (128GB+)
30+
- An 8+ core CPU
31+
- A NVIDIA-manufactured GPU chip (to be expanded on)
32+
- A dedicated SSD to act as a large cache store (512GB+)
33+
- A large amount of RAM for computing data replication (128GB+)
3434

3535
## Getting started as a miner
3636

@@ -58,9 +58,9 @@ In Filecoin, miners are succeptible to two different kinds of slashing: **storag
5858

5959
**Storage fault slashing** is a term that is used to encompass a broader set of penalties, including (but not limited to) fault fees, sector penalties and termination fees. These penalties are to be paid by miners if they fail to provide sector reliability or decide to voluntarily exit the network.
6060

61-
* A **fault fee** is a penalty that a miner incurs for each day a miner’s sector is offline.
62-
* A **sector penalty:** is a penalty that a miner incurs for a faulted sector that was not declared faulted before a [WindowPoSt check](#window-post-checks) occurs.
63-
* The sector will pay a Fault Fee after a Sector Penalty once the fault is detected
64-
* A **termination fee:** is a penalty that a miner incurs when a sector is voluntarily or involuntarily terminated and is removed from the network.
61+
- A **fault fee** is a penalty that a miner incurs for each day a miner’s sector is offline.
62+
- A **sector penalty:** is a penalty that a miner incurs for a faulted sector that was not declared faulted before a `WindowPoSt` check occurs.
63+
- The sector will pay a Fault Fee after a Sector Penalty once the fault is detected
64+
- A **termination fee:** is a penalty that a miner incurs when a sector is voluntarily or involuntarily terminated and is removed from the network.
6565

6666
**Consensus fault slashing** is the penalty that a miner incurs for committing consensus faults. This penalty is applied to miners that have acted maliciously against the network’s consensus functionality.

docs/project/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: The Filecoin Project
33
description: Learn about the history, roadmap, current status and more for Filecoin
44
---
5+
56
# The Filecoin Project
67

78
Curious about how it all got started, or where we're headed? Learn about the history, current state, and future trajectory of the Filecoin project here.
@@ -16,7 +17,7 @@ Learn about the ongoing cryptography research and design efforts that underpin t
1617

1718
## Related projects
1819

19-
Filecoin is a highly modular project that is itself made out of many different protocols and tools. Learn more about the [Filecoin-related projects](/project/related-projects/) supported by Protocol Labs.
20+
Filecoin is a highly modular project that is itself made out of many different protocols and tools. Learn more about the [Filecoin-related projects](related-projects) supported by Protocol Labs.
2021

2122
## Code of conduct
2223

package-lock.json

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"stylus-supremacy": "^2.14.5",
2121
"vuepress": "^1.5.2",
2222
"vuepress-plugin-canonical": "^1.0.0",
23+
"vuepress-plugin-check-md": "0.0.2",
2324
"vuepress-plugin-clean-urls": "^1.1.1",
2425
"vuepress-plugin-ipfs": "^1.0.2",
2526
"vuepress-plugin-robots": "^1.0.1",
@@ -49,14 +50,16 @@
4950
},
5051
"husky": {
5152
"hooks": {
52-
"pre-commit": "lint-staged"
53+
"pre-commit": "lint-staged",
54+
"pre-push": "npm run docs:links"
5355
}
5456
},
5557
"scripts": {
5658
"start": "npm run docs:dev",
5759
"test": "echo \"Error: no test specified\" && exit 1",
5860
"format:styles": "stylus-supremacy format ./docs/.vuepress/**/*.styl --replace",
5961
"docs:dev": "vuepress dev docs",
60-
"docs:build": "vuepress build docs"
62+
"docs:build": "npm run docs:links && vuepress build docs",
63+
"docs:links": "vuepress check-md docs"
6164
}
6265
}

0 commit comments

Comments
 (0)