Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to docusaurus v3 #1522

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@iota-wiki/cli",
"type": "module",
"description": "A command line utility to manage Wiki content and preview content locally.",
"author": "IOTA community",
"license": "MIT",
Expand Down Expand Up @@ -38,9 +39,9 @@
"markdownlint-cli2": "^0.8.1",
"node-html-parser": "^6.1.10",
"prettier": "2.8.8",
"remark": "^14.0.2",
"remark": "^15.0.1",
"remark-lint-no-dead-urls": "^1.1.0",
"unified-engine": "^10.1.0"
"unified-engine": "^11.2.0"
},
"devDependencies": {
"@types/babel__generator": "^7",
Expand Down
8 changes: 4 additions & 4 deletions cli/src/commands/check.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Command, Option } from 'clipanion';
import path from 'path';
import visit from 'unist-util-visit';
import { visit } from 'unist-util-visit';
import { Node } from 'unist';
import checkUrl from 'link-check';
import { parse } from 'node-html-parser';
import { engine } from 'unified-engine';
import { remark } from 'remark';

const buildConfig = require.resolve('../docusaurus/config/build.js');
const SUPPORTED_PLUGINS = [
Expand Down Expand Up @@ -42,8 +44,6 @@ export class Check extends Command {

async execute() {
console.time('check');
const { engine } = await import('unified-engine');
const { remark } = await import('remark');

const directory = this.directory || process.cwd();

Expand Down Expand Up @@ -88,7 +88,7 @@ export class Check extends Command {
await new Promise<number>((resolve, reject) =>
engine(
{
processor: remark(),
processor: remark,
files: [pluginPaths],
extensions: ['md', 'mdx'],
plugins: [RemarkLinkVisitor],
Expand Down
6 changes: 3 additions & 3 deletions cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es2022",
"module": "commonjs",
"moduleResolution": "node16",
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Node",
"resolveJsonModule": true,
"jsx": "react",
"allowJs": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2431,7 +2431,7 @@ the given `storage`.
<a name="IotaDocument+createJwt"></a>

### ~~iotaDocument.createJwt(storage, fragment, payload, options) ⇒ [<code>Promise.&lt;Jws&gt;</code>](#Jws)~~
***Deprecated***
**_Deprecated_**

Sign the `payload` according to `options` with the storage backed private key corresponding to the public key
material in the verification method identified by the given `fragment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ the given `storage`.
<a name="IotaDocument+createJwt"></a>

### ~~iotaDocument.createJwt(storage, fragment, payload, options) ⇒ [<code>Promise.&lt;Jws&gt;</code>](#Jws)~~
***Deprecated***
**_Deprecated_**

Sign the `payload` according to `options` with the storage backed private key corresponding to the public key
material in the verification method identified by the given `fragment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ In order not to lose access to the storage deposit, two additional unlock condit
_Basic Output #7_ in Transaction F:

- A _Storage Deposit Return Unlock Condition_ that forces the consumer of the output to refund _Return Amount_ of base tokens to _Return Address_,
- and an __Expiration Unlock_ Condition_ that defines a time window until the recipient has to claim the transfer. If they don't do so,
- and an _Expiration Unlock Condition_ that defines a time window until the recipient has to claim the transfer. If they don't do so,
ownership of _Basic Output #7_ bounces back to the sender and the _Storage Deposit Return Unlock Condition_ is ignored.
- The expiration time is compared to the timestamp of the confirming milestone to decide whether the unlock is valid or not.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Keep how tos atomic: let each describe one particular task at a time. It is easi

## How To Template

If you do not know where to start, just take this template and replace everything in {CURLY BRACES} or rewrite whole sentences:
If you do not know where to start, just take this template and replace everything in \{CURLY BRACES\} or rewrite whole sentences:

```markdown
# How To {DO SOMETHING}
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/tools/legacy-migration-tool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ network, you should start your migration in a timely manner since other forms of

:::note Storage Deposits

If you have lots of small amounts of $IOTA (<1Mi) spread across lots of addresses, it may not be possible to
If you have lots of small amounts of $IOTA (\<1Mi) spread across lots of addresses, it may not be possible to
migrate these small amounts if their total is less than the minimum [required storage deposit on the
Stardust network](/learn/protocols/stardust/core-concepts/storage-deposit/).

Expand Down
145 changes: 68 additions & 77 deletions docs/learn/governance/the-shimmer-governance-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
</td>
<td>
<ul>
<li>Introducing an idea by posting in the
<li>
Introducing an idea by posting in the
<a href="https://govern.iota.org/"> forum </a>
</li>
<li>Approval by
<li>
Approval by
<a href="#governance-forum-moderators"> moderator </a>
</li>
<li>The moderator adds the proposal to the phase 1 category</li>
Expand All @@ -80,25 +82,31 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
<td>
<ul>
<li>Post in the forum</li>
<li>Follows a defined structure of the
<li>
Follows a defined structure of the
<a href="#412-governance-proposal-template-phase-2--3--emergency-proposal"> governance template </a>
</li>
<li>Approval by
<li>
Approval by
<a href="#governance-forum-moderators"> moderator </a>
</li>
<li>Receives a
<li>
Receives a
<a href="#unique-identifier"> unique identifier number </a>
by a moderator</li>
by a moderator
</li>
<li>A finalized concept ready to be voted on by the community (during phase 2, the proposal should not be possible to edit anymore)</li>
<li>Includes a poll to signal soft consensus</li>
<li>Poll duration 7 days</li>
<li>Poll must receive a minimum of 100 yes votes to be accepted</li>
<li>If accepted, it leads to a network-wide vote in Firefly</li>
<li>Poll must include “Make no changes” option</li>
<li>It is a non-binding decision</li>
<li>Can also be conducted as a runoff poll if any
<li>
Can also be conducted as a runoff poll if any
<a href="#47-counter-proposals"> counter proposals </a>
qualify</li>
qualify
</li>
</ul>
</td>
<td>
Expand All @@ -120,10 +128,12 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
</td>
<td>
<ul>
<li>The post must discuss one of the
<li>
The post must discuss one of the
<a href="/learn/governance/governance-scope"> parameters that are open for governance </a>
</li>
<li>The post must follow the rules set for
<li>
The post must follow the rules set for
<a href="#guaranteeing-stability---resubmital-delay"> resubmittal delays </a>
</li>
<li>Edits require reposting with versioning</li>
Expand All @@ -132,7 +142,8 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
<td>
<ul>
<li>Poll must include “no changes” option</li>
<li>Follows a defined structure as described in the
<li>
Follows a defined structure as described in the
<a href="#412-governance-proposal-template-phase-2--3--emergency-proposal"> proposal template </a>
</li>
<li>No edits allowed</li>
Expand All @@ -153,12 +164,15 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
</td>
<td>
<ul>
<li>Ideas can be posted on the forum any time and should be discussed as long as needed.</li>
<li>
Ideas can be posted on the forum any time and should be discussed as long as needed
</li>
</ul>
</td>
<td>
<ul>
<li>Poll duration is seven days
<li>
Poll duration is seven days
</li>
</ul>
</td>
Expand Down Expand Up @@ -186,29 +200,32 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
<td>
<ul>
<li>Firefly vote: simple majority wins</li>
<li>Must reach 5% quorum of
<li>
Must reach 5% quorum of
<a href="#maximum-achievable-votes"> maximum achieveable votes </a>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<strong>Denied
</strong>
<strong>Denied</strong>
</td>
<td>
<ul>
<li>Spam</li>
<li>Does not talk about the
<li>
Does not talk about the
<a href="/learn/governance/governance-scope"> parameters open for governance </a>
</li>
<li>Proposal has no engagement over 30 days</li>
<li>Proposal doesn't reach a minimum of votes/likes</li>
<li>Proposal conflicts with the
<li>
Proposal conflicts with the
<a href="#guaranteeing-stability---resubmital-delay"> resubmittal delay rules </a>
</li>
<li>Proposal does not meet the
<li>
Proposal does not meet the
<a href="#42-shimmer-governance-framework-guiding-principles"> guiding principles. </a>
</li>
</ul>
Expand All @@ -222,9 +239,9 @@ Once an idea successfully passes phase 2, a vote is initiated in phase 3 using t
<td>
<ul>
<li>Option “Make no changes” reaches the simple majority of votes</li>
<li>Does not reach 5% quorum of
<a href="#maximum-achievable-votes">maximum achievable votes
</a>
<li>
Does not reach 5% quorum of
<a href="#maximum-achievable-votes">maximum achievable votes</a>
</li>
<li>Canceled through an emergency proposal submitted during the 7-day cooldown.</li>
</ul>
Expand Down Expand Up @@ -533,90 +550,64 @@ The following parameters of this framework specification can be adjusted by a mo
</td>
</tr>
<tr>
<td>Minimum required proposal likes in phase 1
</td>
<td>50 likes
</td>
<td>Minimum required proposal likes in phase 1</td>
<td>50 likes</td>
</tr>
<tr>
<td>Minimum required positive votes in a poll phase 1
</td>
<td>50 votes in favor of a proposal
</td>
<td>Minimum required positive votes in a poll phase 1</td>
<td>50 votes in favor of a proposal</td>
</tr>
<tr>
<td>Minimum required positive votes in a poll phase 2
</td>
<td>100 votes in favor of a proposal
</td>
<td>Minimum required positive votes in a poll phase 2</td>
<td>100 votes in favor of a proposal</td>
</tr>
<tr>
<td>Required majority to win in a poll in phase 1
</td>
<td>none
</td>
<td>Required majority to win in a poll in phase 1</td>
<td>none</td>
</tr>
<tr>
<td>Required majority to win in a poll in phase 2
</td>
<td>none
</td>
<td>Required majority to win in a poll in phase 2</td>
<td>none</td>
</tr>
<tr>
<td>Poll duration Phase 2
</td>
<td>7 days
</td>
<td>Poll duration Phase 2</td>
<td>7 days</td>
</tr>
<tr>
<td>Trust level 1 metrics
</td>
<td>tl1 requires topics entered: 3
<td>Trust level 1 metrics</td>
<td>
tl1 requires topics entered: 3
<p>tl1 requires read posts: 3</p>
<p>tl1 requires time spent mins: 25 min</p>
</td>
</tr>
<tr>
<td>Emergency proposal phase 2 poll duration
</td>
<td>48 hours
</td>
<td>Emergency proposal phase 2 poll duration</td>
<td>48 hours</td>
</tr>
<tr>
<td>Emergency proposal phase 2 poll required positive votes
</td>
<td>200 votes in favor of the proposal
</td>
<td>Emergency proposal phase 2 poll required positive votes</td>
<td>200 votes in favor of the proposal</td>
</tr>
<tr>
<td>Cooldown duration after phase 3 vote
</td>
<td>7 days
</td>
<td>Cooldown duration after phase 3 vote</td>
<td>7 days</td>
</tr>
<tr>
<td>Season interval
</td>
<td>3 months
</td>
<td>Season interval</td>
<td>3 months</td>
</tr>
<tr>
<td>Time a phase 2 proposal must be submitted in advance to the moderators to be included in the next phase 2 poll round
</td>
<td>24 hours before the next phase 2 round begins (Monday 4 pm UTC)
</td>
<td>Time a phase 2 proposal must be submitted in advance to the moderators to be included in the next phase 2 poll round</td>
<td>24 hours before the next phase 2 round begins (Monday 4 pm UTC)</td>
</tr>
<tr>
<td>Automatical closing of topics after inactivity for xx days
</td>
<td>30 days
</td>
<td>Automatical closing of topics after inactivity for xx days</td>
<td>30 days</td>
</tr>
<tr>
<td>Moderator tasks and responsibilities
</td>
<td>As defined in the section 4.3 [Governance Forum Moderators][tasks and responsibilities]
</td>
<td>Moderator tasks and responsibilities</td>
<td>As defined in the section 4.3 [Governance Forum Moderators][tasks and responsibilities]</td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 4 additions & 0 deletions docusaurus.config.js → docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ module.exports = async () => {
crossorigin: 'anonymous',
},
],
markdown: {
format: 'detect',
},
presets: [
[
'@docusaurus/preset-classic',
Expand Down Expand Up @@ -247,6 +250,7 @@ module.exports = async () => {
'docusaurus-plugin-openapi-docs',
{
id: 'openapi',
docsPlugin: '@iota-wiki/plugin-docs',
docsPluginId: 'apis', // e.g. "classic" or the plugin-content-docs id
config: {
coreApiShimmer: {
Expand Down