Skip to content

Commit 7e40e12

Browse files
authored
Fix links and redirects (aptos-labs#433)
* Fix links automatically * Fix broken links to the cli section * Fix gas profiler and remaining cli issue * Fix creating-objects broken link * Fix Object links * Fix update-relative-link so it corrects links with # properly * Fix remaining links * Fix redirects * pnpm fmt
1 parent 2aa238b commit 7e40e12

File tree

68 files changed

+184
-204
lines changed

Some content is hidden

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

68 files changed

+184
-204
lines changed

apps/nextra/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ pnpm start
6161

6262
### Fixing Relative Links
6363

64-
1. Go to `update-relative-links.py`
64+
1. Go to `update-relative-links.py` (at the top-level of the repo)
6565
2. Update the absolute paths in the file
66+
3. Run `python3 update-relative-links.py`
67+
4. Run the link checker below to verify the links are fixed.
6668

6769
### Link Checking
6870

apps/nextra/components/landing/sections/BlockchainSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function BlockchainSection() {
6060
<FeatureCard
6161
label={t.randomnessLabel}
6262
description={t.randomnessDescription}
63-
href={`/${locale}/build/smart-contracts/learn-move/advanced-guides/cryptography#verifying-randomness-from-the-drand-beacon`}
63+
href={`/${locale}/build/smart-contracts/cryptography#verifying-randomness-from-the-drand-beacon`}
6464
/>
6565
<FeatureCard
6666
label={t.feePayerLabel}

apps/nextra/components/landing/sections/MoveSection.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function MoveSection() {
2727
coins: {
2828
label: t.coinsExampleLabel,
2929
description: t.coinsExampleDescription,
30-
href: `/${locale}/build/smart-contracts/aptos-standards/aptos-coin`,
30+
href: `/${locale}/build/smart-contracts/aptos-coin`,
3131
codeSnippet: coinsCodeSnippet,
3232
},
3333
objects: {
@@ -39,7 +39,7 @@ export function MoveSection() {
3939
fungibleAssets: {
4040
label: t.fungibleAssetsExampleLabel,
4141
description: t.fungibleAssetsExampleDescription,
42-
href: `/${locale}/build/smart-contracts/aptos-standards/fungible-asset`,
42+
href: `/${locale}/build/smart-contracts/fungible-asset`,
4343
codeSnippet: fungibleAssetsCodeSnippet,
4444
},
4545
}),

apps/nextra/next.config.mjs

+53-77
Original file line numberDiff line numberDiff line change
@@ -129,227 +129,207 @@ export default withBundleAnalyzer(
129129
},
130130
{
131131
source: "/move/book/modules-and-scripts",
132-
destination:
133-
"/en/build/smart-contracts/learn-move/book/modules-and-scripts",
132+
destination: "/en/build/smart-contracts/book/modules-and-scripts",
134133
permanent: true,
135134
},
136135
{
137136
source: "/move/book/integers",
138-
destination: "/en/build/smart-contracts/learn-move/book/integers",
137+
destination: "/en/build/smart-contracts/book/integers",
139138
permanent: true,
140139
},
141140
{
142141
source: "/move/book/bool",
143-
destination: "/en/build/smart-contracts/learn-move/book/bool",
142+
destination: "/en/build/smart-contracts/book/bool",
144143
permanent: true,
145144
},
146145
{
147146
source: "/move/book/address",
148-
destination: "/en/build/smart-contracts/learn-move/book/address",
147+
destination: "/en/build/smart-contracts/book/address",
149148
permanent: true,
150149
},
151150
{
152151
source: "/move/book/vector",
153-
destination: "/en/build/smart-contracts/learn-move/book/vector",
152+
destination: "/en/build/smart-contracts/book/vector",
154153
permanent: true,
155154
},
156155
{
157156
source: "/move/book/signer",
158-
destination: "/en/build/smart-contracts/learn-move/book/signer",
157+
destination: "/en/build/smart-contracts/book/signer",
159158
permanent: true,
160159
},
161160
{
162161
source: "/move/book/references",
163-
destination: "/en/build/smart-contracts/learn-move/book/references",
162+
destination: "/en/build/smart-contracts/book/references",
164163
permanent: true,
165164
},
166165
{
167166
source: "/move/book/tuples",
168-
destination: "/en/build/smart-contracts/learn-move/book/tuples",
167+
destination: "/en/build/smart-contracts/book/tuples",
169168
permanent: true,
170169
},
171170
{
172171
source: "/move/book/variables",
173-
destination: "/en/build/smart-contracts/learn-move/book/variables",
172+
destination: "/en/build/smart-contracts/book/variables",
174173
permanent: true,
175174
},
176175
{
177176
source: "/move/book/equality",
178-
destination: "/en/build/smart-contracts/learn-move/book/equality",
177+
destination: "/en/build/smart-contracts/book/equality",
179178
permanent: true,
180179
},
181180
{
182181
source: "/move/book/abort-and-assert",
183-
destination:
184-
"/en/build/smart-contracts/learn-move/book/abort-and-assert",
182+
destination: "/en/build/smart-contracts/book/abort-and-assert",
185183
permanent: true,
186184
},
187185
{
188186
source: "/move/book/conditionals",
189-
destination: "/en/build/smart-contracts/learn-move/book/conditionals",
187+
destination: "/en/build/smart-contracts/book/conditionals",
190188
permanent: true,
191189
},
192190
{
193191
source: "/move/book/loops",
194-
destination: "/en/build/smart-contracts/learn-move/book/loops",
192+
destination: "/en/build/smart-contracts/book/loops",
195193
permanent: true,
196194
},
197195
{
198196
source: "/move/book/functions",
199-
destination: "/en/build/smart-contracts/learn-move/book/functions",
197+
destination: "/en/build/smart-contracts/book/functions",
200198
permanent: true,
201199
},
202200
{
203201
source: "/move/book/structs-and-resources",
204-
destination:
205-
"/en/build/smart-contracts/learn-move/book/structs-and-resources",
202+
destination: "/en/build/smart-contracts/book/structs-and-resources",
206203
permanent: true,
207204
},
208205
{
209206
source: "/move/book/constants",
210-
destination: "/en/build/smart-contracts/learn-move/book/constants",
207+
destination: "/en/build/smart-contracts/book/constants",
211208
permanent: true,
212209
},
213210
{
214211
source: "/move/book/generics",
215-
destination: "/en/build/smart-contracts/learn-move/book/generics",
212+
destination: "/en/build/smart-contracts/book/generics",
216213
permanent: true,
217214
},
218215
{
219216
source: "/move/book/abilities",
220-
destination: "/en/build/smart-contracts/learn-move/book/abilities",
217+
destination: "/en/build/smart-contracts/book/abilities",
221218
permanent: true,
222219
},
223220
{
224221
source: "/move/book/uses",
225-
destination: "/en/build/smart-contracts/learn-move/book/uses",
222+
destination: "/en/build/smart-contracts/book/uses",
226223
permanent: true,
227224
},
228225
{
229226
source: "/move/book/friends",
230-
destination: "/en/build/smart-contracts/learn-move/book/friends",
227+
destination: "/en/build/smart-contracts/book/friends",
231228
permanent: true,
232229
},
233230
{
234231
source: "/move/book/packages",
235-
destination: "/en/build/smart-contracts/learn-move/book/packages",
232+
destination: "/en/build/smart-contracts/book/packages",
236233
permanent: true,
237234
},
238235
{
239236
source: "/move/book/package-upgrades",
240-
destination:
241-
"/en/build/smart-contracts/learn-move/book/package-upgrades",
237+
destination: "/en/build/smart-contracts/book/package-upgrades",
242238
permanent: true,
243239
},
244240
{
245241
source: "/move/book/unit-testing",
246-
destination: "/en/build/smart-contracts/learn-move/book/unit-testing",
242+
destination: "/en/build/smart-contracts/book/unit-testing",
247243
permanent: true,
248244
},
249245
{
250246
source: "/move/book/global-storage-structure",
251-
destination:
252-
"/en/build/smart-contracts/learn-move/book/global-storage-structure",
247+
destination: "/en/build/smart-contracts/book/global-storage-structure",
253248
permanent: true,
254249
},
255250
{
256251
source: "/move/book/global-storage-operators",
257-
destination:
258-
"/en/build/smart-contracts/learn-move/book/global-storage-operators",
252+
destination: "/en/build/smart-contracts/book/global-storage-operators",
259253
permanent: true,
260254
},
261255
{
262256
source: "/move/book/standard-library",
263-
destination:
264-
"/en/build/smart-contracts/learn-move/book/standard-library",
257+
destination: "/en/build/smart-contracts/book/standard-library",
265258
permanent: true,
266259
},
267260
{
268261
source: "/move/book/coding-conventions",
269-
destination:
270-
"/en/build/smart-contracts/learn-move/book/coding-conventions",
262+
destination: "/en/build/smart-contracts/book/coding-conventions",
271263
permanent: true,
272264
},
273265
{
274266
source: "/move/move-on-aptos/objects/creating-objects",
275-
destination:
276-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/creating-objects",
267+
destination: "/en/build/smart-contracts/objects/creating-objects",
277268
permanent: true,
278269
},
279270
{
280271
source: "/move/move-on-aptos/objects/configuring-objects",
281-
destination:
282-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/configuring-objects",
272+
destination: "/en/build/smart-contracts/objects/configuring-objects",
283273
permanent: true,
284274
},
285275
{
286276
source: "/move/move-on-aptos/objects/using-objects",
287-
destination:
288-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/using-objects",
277+
destination: "/en/build/smart-contracts/objects/using-objects",
289278
permanent: true,
290279
},
291280
{
292281
source: "/move/move-on-aptos/scripts/writing-scripts",
293-
destination:
294-
"/en/build/smart-contracts/learn-move/advanced-guides/scripts/writing-scripts",
282+
destination: "/en/build/smart-contracts/scripts/writing-scripts",
295283
permanent: true,
296284
},
297285
{
298286
source: "/move/move-on-aptos/scripts/compiling-scripts",
299-
destination:
300-
"/en/build/smart-contracts/learn-move/advanced-guides/scripts/compiling-scripts",
287+
destination: "/en/build/smart-contracts/scripts/compiling-scripts",
301288
permanent: true,
302289
},
303290
{
304291
source: "/move/move-on-aptos/scripts/running-scripts",
305-
destination:
306-
"/en/build/smart-contracts/learn-move/advanced-guides/scripts/running-scripts",
292+
destination: "/en/build/smart-contracts/scripts/running-scripts",
307293
permanent: true,
308294
},
309295
{
310296
source: "/move/move-on-aptos/scripts/script-tutorial",
311-
destination:
312-
"/en/build/smart-contracts/learn-move/advanced-guides/scripts/script-tutorial",
297+
destination: "/en/build/smart-contracts/scripts/script-tutorial",
313298
permanent: true,
314299
},
315300
{
316301
source: "/move/move-on-aptos/resource-accounts",
317-
destination:
318-
"/en/build/smart-contracts/learn-move/advanced-guides/resource-accounts",
302+
destination: "/en/build/smart-contracts/resource-accounts",
319303
permanent: true,
320304
},
321305
{
322306
source: "/move/move-on-aptos/modules-on-aptos",
323-
destination:
324-
"/en/build/smart-contracts/learn-move/advanced-guides/modules-on-aptos",
307+
destination: "/en/build/smart-contracts/modules-on-aptos",
325308
permanent: true,
326309
},
327310
{
328311
source: "/move/move-on-aptos/cryptography",
329-
destination:
330-
"/en/build/smart-contracts/learn-move/advanced-guides/cryptography",
312+
destination: "/en/build/smart-contracts/cryptography",
331313
permanent: true,
332314
},
333315
{
334316
source: "/move/move-on-aptos/move-security-guidelines",
335-
destination:
336-
"/en/build/smart-contracts/learn-move/advanced-guides/move-security-guidelines",
317+
destination: "/en/build/smart-contracts/move-security-guidelines",
337318
permanent: true,
338319
},
339320
{
340321
source: "/move/prover/prover-guide",
341-
destination: "/en/build/smart-contracts/learn-move/prover/prover-guide",
322+
destination: "/en/build/smart-contracts/prover/prover-guide",
342323
permanent: true,
343324
},
344325
{
345326
source: "/move/prover/spec-lang",
346-
destination: "/en/build/smart-contracts/learn-move/prover/spec-lang",
327+
destination: "/en/build/smart-contracts/prover/spec-lang",
347328
permanent: true,
348329
},
349330
{
350331
source: "/move/prover/supporting-resources",
351-
destination:
352-
"/en/build/smart-contracts/learn-move/prover/supporting-resources",
332+
destination: "/en/build/smart-contracts/prover/supporting-resources",
353333
permanent: true,
354334
},
355335
{
@@ -568,7 +548,7 @@ export default withBundleAnalyzer(
568548
},
569549
{
570550
source: "/guides/system-integrators-guide",
571-
destination: "/en/build/advanced-guides/system-integrators-guide",
551+
destination: "/en/build/system-integrators-guide",
572552
permanent: true,
573553
},
574554
{
@@ -583,17 +563,17 @@ export default withBundleAnalyzer(
583563
},
584564
{
585565
source: "/guides/sponsored-transactions",
586-
destination: "/en/build/advanced-guides/sponsored-transactions",
566+
destination: "/en/build/sponsored-transactions",
587567
permanent: true,
588568
},
589569
{
590570
source: "/guides/transaction-management",
591-
destination: "/en/build/advanced-guides/transaction-management",
571+
destination: "/en/build/transaction-management",
592572
permanent: true,
593573
},
594574
{
595575
source: "/guides/account-management/key-rotation",
596-
destination: "/en/build/advanced-guides/key-rotation",
576+
destination: "/en/build/key-rotation",
597577
permanent: true,
598578
},
599579
{
@@ -879,7 +859,7 @@ export default withBundleAnalyzer(
879859
},
880860
{
881861
source: "/integration/aptos-names-service-package",
882-
destination: "/en/build/advanced-guides/aptos-name-service",
862+
destination: "/en/build/aptos-name-service",
883863
permanent: true,
884864
},
885865
{
@@ -901,12 +881,12 @@ export default withBundleAnalyzer(
901881
},
902882
{
903883
source: "/move/book/introduction",
904-
destination: "/en/build/smart-contracts/learn-move/book",
884+
destination: "/en/build/smart-contracts/book",
905885
permanent: true,
906886
},
907887
{
908888
source: "/move/book/creating-coins",
909-
destination: "/en/build/smart-contracts/learn-move/book/move-tutorial",
889+
destination: "/en/build/smart-contracts/book/move-tutorial",
910890
permanent: true,
911891
},
912892
{
@@ -1003,29 +983,25 @@ export default withBundleAnalyzer(
1003983
permanent: true,
1004984
},
1005985
{
1006-
source: "/en/build/smart-contracts/learn-move/advanced-guides/objects",
986+
source: "/en/build/smart-contracts/objects",
1007987
destination: "/en/build/smart-contracts/aptos-standards/objects",
1008988
permanent: true,
1009989
},
1010990
{
1011-
source:
1012-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/creating-objects",
991+
source: "/en/build/smart-contracts/objects/creating-objects",
1013992
destination:
1014993
"/en/build/smart-contracts/aptos-standards/objects/creating-objects",
1015994
permanent: true,
1016995
},
1017996
{
1018-
source:
1019-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/configuring-objects",
997+
source: "/en/build/smart-contracts/objects/configuring-objects",
1020998
destination:
1021999
"/en/build/smart-contracts/aptos-standards/objects/creating-objects",
10221000
permanent: true,
10231001
},
10241002
{
1025-
source:
1026-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/creating-objects",
1027-
destination:
1028-
"/en/build/smart-contracts/learn-move/advanced-guides/objects/using-objects",
1003+
source: "/en/build/smart-contracts/objects/creating-objects",
1004+
destination: "/en/build/smart-contracts/objects/using-objects",
10291005
permanent: true,
10301006
},
10311007
],

0 commit comments

Comments
 (0)