Skip to content

Commit bff8cb5

Browse files
authored
Merge pull request #27 from lukaw3d/md-paths
Add file extensions to relative paths
2 parents 0f70408 + 37a9db6 commit bff8cb5

61 files changed

Lines changed: 444 additions & 285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.markdownlint-cli2.cjs

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
// @ts-check
2+
3+
/** @type {import('markdownlint').Options} */
4+
const options = {
5+
config: {
6+
// TODO: enable some of these rules
7+
'line-length': false,
8+
'no-multiple-blanks': false,
9+
'no-hard-tabs': false,
10+
'no-space-in-links': false,
11+
'no-space-in-emphasis': false,
12+
'blanks-around-fences': false,
13+
'list-marker-space': false,
14+
'ol-prefix': false,
15+
'ul-style': false,
16+
'ul-indent': false,
17+
'no-duplicate-header': false,
18+
'no-emphasis-as-heading': false,
19+
'no-trailing-punctuation': false,
20+
'heading-increment': false,
21+
'first-line-heading': false,
22+
'fenced-code-language': false,
23+
'commands-show-output': false,
24+
'no-inline-html': false,
25+
'no-alt-text': false,
26+
},
27+
customRules: [{
28+
// Check relative links have a file extension, and file exists
29+
names: ['relative-links-have-ext'],
30+
description: 'for Docusaurus routing',
31+
tags: ['links'],
32+
information: new URL('https://github.com/oasisprotocol/docs/issues/4'),
33+
function: ({ name, tokens }, onError) => {
34+
const fs = require('fs');
35+
const path = require('path');
36+
const dir = path.dirname(name);
37+
for (const token of tokens) {
38+
if (token.type === 'inline') {
39+
for (const child of token.children) {
40+
if (child.type === 'link_open') {
41+
const [_key, href] = child.attrs.find(([key, value]) => key === 'href');
42+
const isAbsoluteUrl = new URL(href, 'relative://a.b').protocol !== 'relative:';
43+
const isAbsolutePathOrNetworkPath = href.startsWith('/');
44+
const isFragment = href.startsWith('#');
45+
46+
const isRelativePath = !isAbsoluteUrl && !isAbsolutePathOrNetworkPath && !isFragment;
47+
if (isRelativePath) {
48+
const relativePath = href.split('#')[0];
49+
const missingExtension = !path.extname(relativePath);
50+
const missingFile = !fs.existsSync(path.join(dir, relativePath));
51+
if (missingExtension) {
52+
const postfixSuggestions = ['.md', '.mdx', 'README.md', 'README.mdx', '/README.md', '/README.mdx', 'index.md', '/index.md'];
53+
const goodPostfix = postfixSuggestions.find(
54+
postfix => fs.existsSync(path.join(dir, relativePath + postfix))
55+
);
56+
const postfixColumn = 1 + child.line.indexOf(href) + relativePath.length;
57+
const canFix = goodPostfix && child.line.indexOf(href) >= 0;
58+
onError({
59+
lineNumber: child.lineNumber,
60+
context: href,
61+
detail: 'Filename extension missing',
62+
fixInfo: !canFix ? undefined : {
63+
insertText: goodPostfix,
64+
editColumn: postfixColumn,
65+
},
66+
});
67+
} else if (missingFile) {
68+
onError({
69+
lineNumber: child.lineNumber,
70+
context: href,
71+
detail: 'File missing',
72+
});
73+
}
74+
}
75+
}
76+
}
77+
}
78+
}
79+
},
80+
}],
81+
};
82+
83+
module.exports = options;

docs/general/community-resources/community-hub.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,29 @@ Submit a proposal [here](https://oasisfoundation.typeform.com/to/HtYql2aN) and w
6363

6464
Please note that any tokens you earn or win through community programs, such as the Community Cup program or the Ambassador Rewards program, are not sent to you immediately. You need to complete the KYC process and submit your ROSE wallet address before the Oasis Foundation can send you any ROSE tokens.
6565

66-
This token distribution process can take several weeks from start to finish. To learn more about each step in the process and how long you can expect to wait before you receive your ROSE tokens, please see the [Token Delivery & KYC Guide](token-delivery-and-kyc).
66+
This token distribution process can take several weeks from start to finish. To learn more about each step in the process and how long you can expect to wait before you receive your ROSE tokens, please see the [Token Delivery & KYC Guide](token-delivery-and-kyc.md).
6767

6868
## 📲 Setting Up Your ROSE Wallet
6969

7070
In order to receive your ROSE tokens from the Oasis Foundation for any work you have contributed to the network, you need to set up a ROSE wallet.
7171

72-
The recommended way is to use one of the official [Oasis Wallets](../manage-tokens/oasis-wallets/), either the web wallet at [wallet.oasisprotocol.org](https://wallet.oasisprotocol.org) or the browser extension wallet [available in the Chrome Web Store](https://chrome.google.com/webstore/detail/oasis-wallet/ppdadbejkmjnefldpcdjhnkpbjkikoip).
72+
The recommended way is to use one of the official [Oasis Wallets](../manage-tokens/oasis-wallets/README.mdx), either the web wallet at [wallet.oasisprotocol.org](https://wallet.oasisprotocol.org) or the browser extension wallet [available in the Chrome Web Store](https://chrome.google.com/webstore/detail/oasis-wallet/ppdadbejkmjnefldpcdjhnkpbjkikoip).
7373

7474
:::tip
7575

7676
Both Oasis Wallets also support connecting to your Ledger-backed ROSE wallet.
7777

7878
:::
7979

80-
If you need more options, take a look our [3rd Party Custody & Wallets](../manage-tokens/holding-rose-tokens/) guide.
80+
If you need more options, take a look our [3rd Party Custody & Wallets](../manage-tokens/holding-rose-tokens/README.md) guide.
8181

8282
## 💰 Delegate Your ROSE Tokens & Earn Staking Rewards
8383

8484
Did you know you grow your ROSE holdings over time, while also contributing to the security of the Oasis Network? The Oasis Network relies on a process called staking in order to ensure the network is protected against attacks. There are mechanisms built into the Oasis Network that pay out rewards to validator nodes that have staked ROSE tokens to secure the network.
8585

8686
Anyone who has ROSE tokens can delegate their tokens to a validator and start earning a slice of that validator's staking rewards, based on how many ROSE tokens are delegated.
8787

88-
You can use one of the official [Oasis Wallets](../manage-tokens/oasis-wallets/) to delegate your ROSE tokens to validators. Additionally, [3rd party custody providers and wallets](../manage-tokens/holding-rose-tokens/) also offer you the option of delegating your ROSE tokens.
88+
You can use one of the official [Oasis Wallets](../manage-tokens/oasis-wallets/README.mdx) to delegate your ROSE tokens to validators. Additionally, [3rd party custody providers and wallets](../manage-tokens/holding-rose-tokens/README.md) also offer you the option of delegating your ROSE tokens.
8989

9090
You can review the list of active Oasis Network validators via the [Oasis Scan](https://www.oasisscan.com/validators) or [Oasis Monitor](https://oasismonitor.com/validators) block explorers or use the built-in facilities of your wallet. You're welcome to delegate your ROSE tokens to any of the active validators.
9191

docs/general/contribute-to-the-network/contribution-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:::info
44

5-
This document outlines our guidelines for contributing to the Oasis Network's codebase and documentation. If you are interested in learning more about the Oasis Network's governance model, including the processes for submitting feature requests and bug fixes, [please see our governance overview here](network-governance).
5+
This document outlines our guidelines for contributing to the Oasis Network's codebase and documentation. If you are interested in learning more about the Oasis Network's governance model, including the processes for submitting feature requests and bug fixes, [please see our governance overview here](network-governance.md).
66

77
:::
88

docs/general/contribute-to-the-network/network-governance.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:::info
66

7-
If you have a general question on how to use and deploy our software, please read our [Run a Node](../run-a-node/node-operator-overview) section or join our [community Slack](https://join.slack.com/t/oasiscommunity/shared_invite/enQtNjQ5MTA3NTgyOTkzLWIxNTg1ZWZmOTIwNmQ2MTg1YmU0MzgyMzk3OWM2ZWQ4NTQ0ZDJkNTBmMTdlM2JhODllYjg5YmJkODc2NzgwNTg).
7+
If you have a general question on how to use and deploy our software, please read our [Run a Node](../run-a-node/node-operator-overview.mdx) section or join our [community Slack](https://join.slack.com/t/oasiscommunity/shared_invite/enQtNjQ5MTA3NTgyOTkzLWIxNTg1ZWZmOTIwNmQ2MTg1YmU0MzgyMzk3OWM2ZWQ4NTQ0ZDJkNTBmMTdlM2JhODllYjg5YmJkODc2NzgwNTg).
88

9-
All community members are welcome and encouraged to commit code, documentation and enhancement proposals to the platform. Contribution guidelines can be found [here](contribution-guidelines).
9+
All community members are welcome and encouraged to commit code, documentation and enhancement proposals to the platform. Contribution guidelines can be found [here](contribution-guidelines.md).
1010

1111
:::
1212

@@ -24,8 +24,8 @@ In order for the community to balance distributed ownership and participation wi
2424

2525
Moving forward, our proposed process for reviewing and approving major protocol updates is:
2626

27-
* **Proposals** for features and roadmap updates can come from anyone in the community in the form of issues ([for minor features](network-governance#minor-feature-requests)) or [Architectural Decision Records](../../../oasis-core/adr) (ADRs, [for major features](network-governance#major-feature-requests)).
28-
* **Review and discussion of the proposals.** Decisions about the future of the project are made through discussion with all members of the community, from the newest user to the most experienced. All non-sensitive project management discussion takes place in the Oasis Protocol GitHub via issues ([for minor features](network-governance#minor-feature-requests)) and ADRs ([for major features](network-governance#major-feature-requests)).
27+
* **Proposals** for features and roadmap updates can come from anyone in the community in the form of issues ([for minor features](network-governance.md#minor-feature-requests)) or [Architectural Decision Records](/oasis-core/adr) (ADRs, [for major features](network-governance.md#major-feature-requests)).
28+
* **Review and discussion of the proposals.** Decisions about the future of the project are made through discussion with all members of the community, from the newest user to the most experienced. All non-sensitive project management discussion takes place in the Oasis Protocol GitHub via issues ([for minor features](network-governance.md#minor-feature-requests)) and ADRs ([for major features](network-governance.md#major-feature-requests)).
2929
* **Decision making process.** In order to ensure that the project is not bogged down by endless discussion and continual voting, the project operates a policy of lazy consensus. This allows the majority of decisions to be made without resorting to a formal vote.
3030

3131
In general, as long as nobody explicitly opposes a proposal or patch, it is recognised as having the support of the community. For lazy consensus to be effective, it is necessary to allow at least 72 hours before assuming that there are no objections to the proposal. This requirement ensures that everyone is given enough time to read, digest and respond to the proposal.
@@ -42,7 +42,7 @@ If the feature is small - a change to a single piece of functionality, or an add
4242

4343
### Major Feature Requests
4444

45-
If the feature is more complicated, involves protocol changes, or has potential safety or performance implications, then consider [proposing an Architectural Decision Record (ADR)](../../../oasis-core/adr) and submit it as a pull request to the Oasis Core repository. This will allow a structured review and commenting of the proposed changes. You should aim to get the ADR accepted and merged before starting on implementation. Please keep in mind that the project's committers still have the final word on what is accepted into the project.
45+
If the feature is more complicated, involves protocol changes, or has potential safety or performance implications, then consider [proposing an Architectural Decision Record (ADR)](/oasis-core/adr) and submit it as a pull request to the Oasis Core repository. This will allow a structured review and commenting of the proposed changes. You should aim to get the ADR accepted and merged before starting on implementation. Please keep in mind that the project's committers still have the final word on what is accepted into the project.
4646

4747
:::info
4848

@@ -64,4 +64,4 @@ Otherwise, please, first search between [existing issues in our repository](http
6464

6565
### Contributing to the Network
6666

67-
If you are interested in contributing to the Oasis Network's codebase or documentation, please [review our contribution guidelines here.](contribution-guidelines)
67+
If you are interested in contributing to the Oasis Network's codebase or documentation, please [review our contribution guidelines here.](contribution-guidelines.md)

docs/general/contribute-to-the-network/run-a-paratime-node.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Oasis Network has two main components, the Consensus Layer and the ParaTime
1818

1919
Operating a ParaTime requires the participation of node operators, who contribute nodes to the committee in exchange for rewards. ParaTimes can be operated by anyone, and have their own reward system, participation requirements, and structure.
2020

21-
As a node operator you can participate in any number of ParaTimes. While there are a number of ParaTimes under development, below are a few key ParaTimes that you can get involved in today. For operational documentation on running a ParaTime, please see the section on [running a ParaTime node for node operators](../run-a-node/set-up-your-node/run-a-paratime-node).
21+
As a node operator you can participate in any number of ParaTimes. While there are a number of ParaTimes under development, below are a few key ParaTimes that you can get involved in today. For operational documentation on running a ParaTime, please see the section on [running a ParaTime node for node operators](../run-a-node/set-up-your-node/run-a-paratime-node.mdx).
2222

2323
<Tabs>
2424
<TabItem value="Cipher ParaTime">
@@ -33,11 +33,11 @@ An Oasis Foundation developed ParaTime that will enable WebAssembly-based confid
3333
* **Status:** Deployed on Mainnet and Testnet
3434
* **Tesnet Launch Date:** June 2021
3535
* **Mainnet Launch Date:** October 2021
36-
* **Slack Channel:** [#cipher-paratime](../oasis-network/connect-with-us#social-media-channels)
36+
* **Slack Channel:** [#cipher-paratime](../oasis-network/connect-with-us.md#social-media-channels)
3737
* **Requires SGX**: Yes
3838
* **Parameters:**
39-
* [Mainnet](../oasis-network/network-parameters#cipher-paratime)
40-
* [Testnet](../foundation/testnet/#cipher-paratime)
39+
* [Mainnet](../oasis-network/network-parameters.md#cipher-paratime)
40+
* [Testnet](../foundation/testnet/README.md#cipher-paratime)
4141

4242
### Features
4343

@@ -70,7 +70,7 @@ An EVM-compatible Oasis Foundation developed ParaTime that enables the use of EV
7070
* **Requires SGX:** No
7171
* **Parameters:**
7272
* [Mainnet](../oasis-network/network-parameters.md#emerald-paratime)
73-
* [Testnet](../foundation/testnet/#emerald-paratime)
73+
* [Testnet](../foundation/testnet/README.md#emerald-paratime)
7474

7575
### Features
7676

docs/general/contribute-to-the-network/run-validator.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ description: >-
66

77
# Run a Consensus Validator Node
88

9-
[Oasis Network](../oasis-network/overview)'s Consensus Layer is a decentralised set of validator nodes that maintain a proof-of-stake blockchain.
9+
[Oasis Network](../oasis-network/overview.md)'s Consensus Layer is a decentralised set of validator nodes that maintain a proof-of-stake blockchain.
1010

1111
Hence, it needs a set of distributed node operators that run different nodes (including validator nodes).
1212

1313
## Technical setup
1414

15-
Make sure your system meets the [Hardware](../run-a-node/prerequisites/hardware-recommendations) prerequisites and has [Oasis Node](../run-a-node/prerequisites/oasis-node) installed.
15+
Make sure your system meets the [Hardware](../run-a-node/prerequisites/hardware-recommendations.md) prerequisites and has [Oasis Node](../run-a-node/prerequisites/oasis-node.md) installed.
1616

17-
Then proceed by following the [Run a Validator Node](../run-a-node/set-up-your-node/run-validator) guide to:
17+
Then proceed by following the [Run a Validator Node](../run-a-node/set-up-your-node/run-validator.md) guide to:
1818

1919
* Create your entity.
2020
* Initialize and configure your node.
@@ -27,24 +27,24 @@ To become a validator on the Oasis Network, you need to have enough tokens stake
2727

2828
:::info
2929

30-
For more information about obtaining information on your entity's account, see the [Account Get Info](../manage-tokens/advanced/oasis-cli-tools/get-account-info) doc.
30+
For more information about obtaining information on your entity's account, see the [Account Get Info](../manage-tokens/advanced/oasis-cli-tools/get-account-info.md) doc.
3131

3232
:::
3333

3434
Currently, you should have:
3535

36-
* 100 ROSE staked for your entity's registration since that is the [current entity's staking threshold](../oasis-network/genesis-doc#node-and-paratime-token-thresholds).
37-
* 100 ROSE staked for your validator node's registration since that is the [current validator node's staking threshold](../oasis-network/genesis-doc#node-and-paratime-token-thresholds).
36+
* 100 ROSE staked for your entity's registration since that is the [current entity's staking threshold](../oasis-network/genesis-doc.md#node-and-paratime-token-thresholds).
37+
* 100 ROSE staked for your validator node's registration since that is the [current validator node's staking threshold](../oasis-network/genesis-doc.md#node-and-paratime-token-thresholds).
3838
* Enough ROSE staked to be in the top 110 entities (by stake) so your validator will be elected into the consensus committee.
3939

4040
:::info
4141

42-
The size of the consensus committee (i.e. the validator set) is configured by the [**max_validators** consensus parameter](../oasis-network/genesis-doc#consensus).
42+
The size of the consensus committee (i.e. the validator set) is configured by the [**max_validators** consensus parameter](../oasis-network/genesis-doc.md#consensus).
4343

4444
:::
4545

4646
:::info
4747

48-
To determine if you are eligible to receive a delegation from the Oasis Protocol Foundation, see the [Delegation Policy](../foundation/delegation-policy) document.
48+
To determine if you are eligible to receive a delegation from the Oasis Protocol Foundation, see the [Delegation Policy](../foundation/delegation-policy.md) document.
4949

5050
:::

0 commit comments

Comments
 (0)