Skip to content

Commit 71fd1c2

Browse files
authored
Merge pull request #1434 from ethereum-optimism/metakeyword-batch1
logic updates + superchain directory
2 parents 5c5ed31 + 1e73094 commit 71fd1c2

15 files changed

+570
-289
lines changed

keywords.config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ metadata_rules:
1010
- app-developer
1111
- node-operator
1212
- chain-operator
13-
- protocol-developer
1413
- partner
14+
- protocol-developer
15+
- auditor
16+
- governance-participant
1517
description: "Must select at least one valid persona"
1618

1719
# CONTENT TYPE
@@ -176,6 +178,11 @@ metadata_rules:
176178
- testnet
177179
- mainnet
178180

181+
# Superchain Categories
182+
- superchain-registry
183+
- security-council
184+
- blockspace-charters
185+
179186
# TIMEFRAME
180187
timeframe:
181188
required_for:

notes/metadata-update.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,30 @@ Quick guide on using our metadata management system for the OP Stack documentati
1313
## Using the Scripts
1414

1515
1. Run a dry run to preview changes:
16-
* Process all .mdx files in a directory
17-
```bash
18-
pnpm metadata-batch-cli:dry "pages/app-developers/**/*.mdx"
19-
```
20-
* Process a specific file with verbose output
21-
```bash
22-
pnpm metadata-batch-cli:verbose "pages/app-developers/example.mdx"
23-
```
24-
* Process multiple directories
25-
```bash
26-
pnpm metadata-batch-cli:dry "pages/app-developers/**/*.mdx" "pages/node-operators/**/*.mdx"
27-
```
16+
```bash
17+
# Process all .mdx files in a directory
18+
pnpm metadata-batch-cli:dry "pages/superchain/*.mdx"
19+
20+
# Process a specific file with verbose output
21+
pnpm metadata-batch-cli:verbose "pages/app-developers/example.mdx"
22+
23+
# Process multiple directories
24+
pnpm metadata-batch-cli:dry "pages/app-developers/*.mdx" "pages/node-operators/*.mdx"
25+
```
2826

2927
2. Apply the changes (remove :dry):
30-
```bash
31-
pnpm metadata-batch-cli "pages/app-developers/**/*.mdx"
32-
```
28+
```bash
29+
pnpm metadata-batch-cli "pages/app-developers/*.mdx"
30+
```
3331

3432
### Important Note About File Patterns
3533

36-
* Use `**/*.mdx` to match all .mdx files in a directory and its subdirectories
37-
* The double asterisk `**` is required for recursive directory matching
38-
* Single `/` patterns will not work correctly
34+
Use these patterns to match files:
35+
36+
* `directory/*.mdx` - matches all .mdx files in a specific directory
37+
* `directory/subdirectory/*.mdx` - matches all .mdx files in a specific subdirectory
38+
* `directory/*/*.mdx` - matches all .mdx files in all immediate subdirectories
39+
* the quotes around the pattern are important to prevent shell expansion
3940

4041
### Configuration Files
4142

@@ -100,13 +101,13 @@ metadata_rules:
100101
* Commit your current changes
101102
* Ensure you're in the docs root directory
102103
* Check that keywords.config.yaml exists and is properly configured
103-
* **Important**: All valid metadata values must be defined in keywords.config.yaml
104+
* **Important**: All metadata values must be defined in keywords.config.yaml
104105
105106
2. **After Running**
106-
* Review the manifest file
107-
* Check validation messages in console output
108-
* Verify metadata changes in files
109-
* Review any files flagged for category review
107+
* Review the categories assigned to each file
108+
* Check that topics and personas are correct
109+
* Verify any files marked for review
110+
* Make sure network types (mainnet/testnet) are correct for registry files
110111
111112
## Content Analysis
112113

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix && pnpm breadcrumbs && pnpm fix-redirects && pnpm metadata-batch-cli",
99
"spellcheck:lint": "cspell lint \"**/*.mdx\"",
1010
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt",
11-
"breadcrumbs": "npx ts-node-esm --skip-project utils/create-breadcrumbs.ts",
12-
"check-breadcrumbs": "node --loader ts-node/esm utils/breadcrumbs.ts",
13-
"check-redirects": "node --loader ts-node/esm utils/redirects.ts",
14-
"fix-redirects": "node --loader ts-node/esm utils/fix-redirects.ts",
15-
"link-checker": "node --loader ts-node/esm utils/link-checker.ts",
16-
"metadata-batch-cli": "node --loader ts-node/esm utils/metadata-batch-cli.ts",
11+
"breadcrumbs": "NODE_NO_WARNINGS=1 npx ts-node-esm --skip-project utils/create-breadcrumbs.ts",
12+
"check-breadcrumbs": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/breadcrumbs.ts",
13+
"check-redirects": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/redirects.ts",
14+
"fix-redirects": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/fix-redirects.ts",
15+
"link-checker": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/link-checker.ts",
16+
"metadata-batch-cli": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/metadata-batch-cli.ts",
1717
"metadata-batch-cli:dry": "pnpm metadata-batch-cli --dry-run",
1818
"metadata-batch-cli:verbose": "pnpm metadata-batch-cli --verbose",
19-
"validate-metadata": "CHANGED_FILES=$(git diff --name-only HEAD) node --loader ts-node/esm utils/metadata-manager.ts",
20-
"validate-pr-metadata": "node --loader ts-node/esm utils/metadata-manager.ts --pr",
19+
"validate-metadata": "CHANGED_FILES=$(git diff --name-only HEAD) NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/metadata-manager.ts",
20+
"validate-pr-metadata": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/metadata-manager.ts --pr",
2121
"dev": "next dev",
2222
"build": "next build",
2323
"start": "next start",

pages/superchain/addresses.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
---
2-
title: Contract addresses
3-
lang: en-US
2+
title: Contract Addresses
43
description: This reference guide lists all the contract addresses for Mainnet and Testnet.
4+
lang: en-US
5+
content_type: guide
6+
topic: contract-addresses
7+
personas:
8+
- chain-operator
9+
- protocol-developer
10+
categories:
11+
- superchain-registry
12+
- mainnet
13+
- testnet
14+
is_imported_content: 'false'
515
---
616

717
import { Callout } from 'nextra/components'

pages/superchain/blockspace-charter.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
---
2-
title: Blockspace and Standard Rollup Charters
2+
title: The Blockspace and Standard Rollup charters
3+
description: >-
4+
Learn about Blockspace Charters, the Standard Rollup Charter, and the
5+
Superchain Registry.
36
lang: en-US
4-
description: Learn about Blockspace Charters, the Standard Rollup Charter, and the Superchain Registry.
7+
content_type: guide
8+
topic: the-blockspace-and-standard-rollup-charters
9+
personas:
10+
- chain-operator
11+
- protocol-developer
12+
- governance-participant
13+
categories:
14+
- blockspace-charters
15+
- mainnet
16+
is_imported_content: 'false'
517
---
618

719
# The Blockspace and Standard Rollup charters

pages/superchain/networks.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
---
22
title: OP Stack networks and public RPC endpoints
3-
lang: en-US
43
description: Learn about the different OP Stack networks and public RPC endpoints.
4+
lang: en-US
5+
content_type: guide
6+
topic: op-stack-networks-and-public-rpc-endpoints
7+
personas:
8+
- chain-operator
9+
- app-developer
10+
- protocol-developer
11+
categories:
12+
- superchain-registry
13+
- mainnet
14+
- testnet
15+
is_imported_content: 'false'
516
---
617

718
import { Callout } from 'nextra/components'

pages/superchain/privileged-roles.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
---
22
title: Privileged Roles in OP Stack Chains
3-
lang: en-US
43
description: Learn about the privileged roles in OP Stack chains.
4+
lang: en-US
5+
content_type: guide
6+
topic: privileged-roles-in-op-stack-chains
7+
personas:
8+
- chain-operator
9+
- protocol-developer
10+
- auditor
11+
categories:
12+
- protocol
13+
- security
14+
- testnet
15+
is_imported_content: 'false'
516
---
617

718
import { Callout } from 'nextra/components'

pages/superchain/standard-configuration.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
---
22
title: What makes a chain standard?
3+
description: >-
4+
Learn what makes a chain standard, how op-deployer helps with standardization,
5+
and why being standard matters.
36
lang: en-US
4-
description: Learn what makes a chain standard, how op-deployer helps with standardization, and why being standard matters.
7+
content_type: guide
8+
topic: what-makes-a-chain-standard
9+
personas:
10+
- chain-operator
11+
- protocol-developer
12+
- auditor
13+
categories:
14+
- protocol
15+
- security
16+
is_imported_content: 'false'
517
---
618

719
import { Callout } from 'nextra/components'

pages/superchain/superchain-explainer.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
---
22
title: Superchain explainer
3+
description: 'Learn about Optimism Superchain components, features, and roadmap.'
34
lang: en-US
4-
description: Learn about Optimism Superchain components, features, and roadmap.
5+
content_type: guide
6+
topic: superchain-explainer
7+
personas:
8+
- app-developer
9+
- chain-operator
10+
- node-operator
11+
- protocol-developer
12+
- auditor
13+
categories:
14+
- mainnet
15+
- protocol
16+
- security
17+
- architecture
18+
is_imported_content: 'false'
519
---
620

721
import { Callout } from 'nextra/components'

pages/superchain/superchain-registry.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
---
22
title: The Superchain Registry
3-
lang: en-US
43
description: Learn about the members of the Optimism Superchain ecosystem.
4+
lang: en-US
5+
content_type: guide
6+
topic: the-superchain-registry
7+
personas:
8+
- chain-operator
9+
- protocol-developer
10+
- auditor
11+
categories:
12+
- superchain-registry
13+
- protocol
14+
- security
15+
- configuration
16+
is_imported_content: 'false'
517
---
618

719
import { Callout } from 'nextra/components'

0 commit comments

Comments
 (0)