Skip to content

Commit b634988

Browse files
Merge pull request #15 from OpenZeppelin/fix/misc-content
fix/misc content
2 parents d07b888 + 6d65b03 commit b634988

410 files changed

Lines changed: 21636 additions & 829 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.

AGENTS.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,69 @@ The site uses a **modular JSON navigation system** instead of fumadocs meta.json
5050
- PascalCase for React components and interfaces
5151
- camelCase for variables and functions
5252
- kebab-case for file names in content directories
53+
54+
## Markdown Link Cleanup Strategy
55+
56+
### Problem
57+
Legacy markdown files often contain complex, unreadable link syntax that creates URL-encoded URLs like:
58+
```
59+
http://localhost:3000/api/access#has_role(role:-felt252,-account:-contractaddress)-%E2%86%92-bool-external
60+
```
61+
62+
### Solution Approach
63+
When cleaning up markdown files with complex link syntax, follow this systematic approach:
64+
65+
#### 1. Identify Complex Link Patterns
66+
Look for these problematic patterns:
67+
- **Function list links**: `[`+function_name+`](#`[.contract-item-name]#`function_name`#`(params)``-[.item-kind]#external#)`
68+
- **Event list links**: `[`+EventName+`](#`[.contract-item-name]#`eventname`#`(params)``-[.item-kind]#event#)`
69+
- **Function headings**: `#### `[.contract-item-name]#`function_name`#`(params)`` [.item-kind]#external#`
70+
71+
#### 2. Create Clean Link Strategy
72+
Replace with simple, readable format:
73+
- **Clean list links**: `[`function_name`](#prefix-function_name)`
74+
- **Clean headings with anchors**:
75+
```markdown
76+
<a id="prefix-function_name"></a>
77+
#### `function_name(params) → return_type`
78+
```
79+
80+
#### 3. Anchor ID Naming Convention
81+
Use descriptive prefixes to avoid conflicts:
82+
- `iaccesscontrol-` for interface functions/events
83+
- `component-` for component functions/events
84+
- `extension-` for extension functions/events
85+
86+
#### 4. Implementation Process
87+
1. **Use Task agent** for systematic fixes across large files
88+
2. **Fix by section** - group related functions/events together
89+
3. **Update both links and targets** - ensure table of contents links point to correct anchors
90+
4. **Verify no complex patterns remain** - search for `[.contract-item-name]#` and `[.item-kind]#`
91+
92+
#### 5. Benefits
93+
- ✅ Clean, readable URLs
94+
- ✅ Better SEO and user experience
95+
- ✅ Easier maintenance and debugging
96+
- ✅ Consistent markdown formatting
97+
98+
### Example Before/After
99+
100+
**Before (Complex):**
101+
```markdown
102+
* [`+has_role(role, account)+`](#`[.contract-item-name]#`has_role`#`(role:-felt252,-account:-contractaddress)-→-bool``-[.item-kind]#external#)
103+
104+
#### `[.contract-item-name]#`has_role`#`(role: felt252, account: ContractAddress) → bool`` [.item-kind]#external#
105+
```
106+
107+
**After (Clean):**
108+
```markdown
109+
* [`has_role(role, account)`](#iaccesscontrol-has_role)
110+
111+
<a id="iaccesscontrol-has_role"></a>
112+
#### `has_role(role: felt252, account: ContractAddress) → bool`
113+
```
114+
115+
### Framework Compatibility Notes
116+
- **DO NOT use `{#anchor}` syntax** - breaks the framework parser
117+
- **USE HTML anchor tags** - `<a id="anchor-name"></a>` format is safe
118+
- **Test locally** to ensure links work properly after changes

cli.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"aliases": {
3+
"uiDir": "./components/ui",
4+
"componentsDir": "./components",
5+
"blockDir": "./components",
6+
"cssDir": "./styles",
7+
"libDir": "./lib"
8+
},
9+
"baseDir": "src",
10+
"commands": {}
11+
}

content/cairo-contracts/access.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: Access
3-
description: Access
43
---
54

65
Access control--that is, "who is allowed to do this thing"—is incredibly important in the world of smart contracts.

content/cairo-contracts/accounts.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: Accounts
3-
description: Accounts
43
---
54

65
Unlike Ethereum where accounts are derived from a private key, all Starknet accounts are contracts. This means there’s no Externally Owned Account (EOA)

content/cairo-contracts/api/access.mdx

Lines changed: 1239 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)