Skip to content

Commit 5db3265

Browse files
docs: Refactor sidebar navigation (otter-sec#2852)
1 parent 7c79f9a commit 5db3265

3 files changed

Lines changed: 26 additions & 28 deletions

File tree

docs/src/pages/_app.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ import 'focus-visible'
1414
import '@/styles/tailwind.css'
1515

1616
const navigation = [
17-
{
18-
title: 'Prologue',
19-
links: [
20-
{ title: 'Release Notes', href: '/docs/release-notes' },
21-
{ title: 'CHANGELOG', href: '/docs/changelog' },
22-
{ title: 'Contribution Guide', href: '/docs/contribution-guide' },
23-
],
24-
},
2517
{
2618
title: 'Getting Started',
2719
links: [
@@ -32,6 +24,13 @@ const navigation = [
3224
{ title: 'Intro to Solana', href: '/docs/intro-to-solana' },
3325
],
3426
},
27+
{
28+
title: 'Release Notes',
29+
links: [
30+
{ title: '0.29.0', href: '/release-notes/0.29.0' },
31+
{ title: 'CHANGELOG', href: '/release-notes/changelog' },
32+
],
33+
},
3534
{
3635
title: 'Core concepts',
3736
links: [
@@ -58,6 +57,7 @@ const navigation = [
5857
{
5958
title: 'Guides',
6059
links: [
60+
{ title: 'Contribution Guide', href: '/docs/contribution-guide' },
6161
{ title: 'Publishing Source', href: '/docs/publishing-source' },
6262
{
6363
title: 'Verifiable Builds',
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
---
2-
title: Release Notes
3-
description: Anchor - Release Notes
2+
title: Release Notes 0.29.0
3+
description: Anchor - Release Notes 0.29.0
44
---
55

66
Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANGELOG.md) but it's not easy to make sense what has changed, what effect does the change have and how to migrate. This is where release notes comes in, an easy to digest and actionable view for each release.
77

88
---
99

10-
## [0.29.0]
11-
12-
### How to update
10+
## How to update
1311

1412
1. Update `avm`:
1513

@@ -27,7 +25,7 @@ Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANG
2725

2826
4. Update TS package(s) to `0.29.0`.
2927

30-
### Solana `1.14` is no longer supported
28+
## Solana `1.14` is no longer supported
3129

3230
Minimum supported Solana version is now `1.16.0` because
3331

@@ -40,7 +38,7 @@ If you are still on Solana `1.14`, update by running:
4038
solana-install init 1.17.0
4139
```
4240

43-
### Override toolchain for the workspace
41+
## Override toolchain for the workspace
4442

4543
`Anchor.toml` has a new section called `[toolchain]` that allows overriding the current toolchain versions inside the workspace.
4644

@@ -50,13 +48,13 @@ anchor_version = "0.29.0" # `anchor-cli` version to use
5048
solana_version = "1.17.0" # Solana version to use
5149
```
5250

53-
#### Notes
51+
### Notes
5452

5553
- Fields are optional.
5654
- `anchor_version` requires [`avm`](https://github.com/coral-xyz/anchor/tree/master/avm) to be installed.
5755
- Before this release, `anchor_version` and `solana_version` keys in `Anchor.toml` were being used for Docker verifiable builds only. Now, all commands work via the `[toolchain]` section.
5856

59-
### Install CLI from commit with `avm`
57+
## Install CLI from commit with `avm`
6058

6159
It is possible to install CLI from commit by running:
6260

@@ -94,7 +92,7 @@ Specify `toolchain.anchor_version` as `<VERSION>-<COMMIT>`:
9492
anchor_version = "0.28.0-6cf200493a307c01487c7b492b4893e0d6f6cb23"
9593
```
9694

97-
### Multiple files template
95+
## Multiple files template
9896

9997
Programs created with `anchor init` or `anchor new` have a single `lib.rs` file but not everyone prefers a single file approach for programs.
10098

@@ -123,7 +121,7 @@ or if you have an existing workspace:
123121
anchor new <NAME> --template multiple
124122
```
125123

126-
### Upgradeable programs in tests
124+
## Upgradeable programs in tests
127125

128126
You can now configure upgradability of the programs in `anchor test`.
129127

@@ -143,7 +141,7 @@ program = "swap.so"
143141
upgradeable = true
144142
```
145143

146-
### Lamport utilities
144+
## Lamport utilities
147145

148146
Transferring lamports from a PDA is quite complicated due to the types that are being used.
149147

@@ -175,7 +173,7 @@ let lamports = ctx.accounts.my_account.get_lamports();
175173

176174
**Note:** The new methods are not only more ergonomic but they are also more performant than the previous examples. This is because `to_account_info` method clones the data internally but the new methods use a reference to the underlying data.
177175

178-
### Type safe context bumps
176+
## Type safe context bumps
179177

180178
Before this release, `ctx.bumps` used to be a `BTreeMap<String, u8>` which doesn't provide type safety for the keys(account names).
181179

@@ -191,7 +189,7 @@ let bump = ctx.bumps.my_account;
191189

192190
**Note**: The new way is not only more intuitive but also is more performant. This is mainly because `BTreeMap` is heap-allocated and it has to resize and grow occasionally.
193191

194-
### `idl-build` feature
192+
## `idl-build` feature
195193

196194
There is a new way to generate IDLs via compilation.
197195

@@ -208,7 +206,7 @@ The IDL will be built automatically when you run `anchor build` but if you'd lik
208206
anchor idl build
209207
```
210208

211-
#### Notes
209+
### Notes
212210

213211
- All crates that are being used for the IDL generation needs to be added to the `idl-build` feature list.
214212

@@ -227,7 +225,7 @@ idl-build = [
227225
- Generation time is a lot slower compared to the default method(parsing) due to Rust compile times.
228226
- Even though most of it works great, some parts are still rough around the edges and you may encounter parts that are not fully ironed out. Please [create an issue](https://github.com/coral-xyz/anchor/issues) if you run into a problem.
229227

230-
### Type aliases
228+
## Type aliases
231229

232230
Anchor IDL now supports type aliases.
233231

@@ -284,7 +282,7 @@ Generates the following IDL:
284282

285283
**Note:** This example only works with the default IDL generation method(parsing) for now because type aliases for default Rust types don't work properly with `idl-build`([#2640](https://github.com/coral-xyz/anchor/issues/2640)).
286284

287-
### Export `mpl-token-metadata`
285+
## Export `mpl-token-metadata`
288286

289287
`anchor-spl` with `metadata` feature enabled now exports the `mpl-token-metadata` crate.
290288

@@ -302,7 +300,7 @@ and use the exported crate from `anchor-spl`:
302300
use anchor_spl::metadata::mpl_token_metadata;
303301
```
304302

305-
### TypeScript SDK improvements
303+
## TypeScript SDK improvements
306304

307305
1. `Program.addEventListener` method is now strongly typed -- correct types for the event names and the event returned from the callback instead of `any`.
308306

@@ -317,7 +315,7 @@ use anchor_spl::metadata::mpl_token_metadata;
317315

318316
4. Removed `assert` and `base64-js` dependency.
319317

320-
### New docker image
318+
## New docker image
321319

322320
The previous image([projectserum/build](https://hub.docker.com/r/projectserum/build)) is now deprecated, new image is [backpackapp/build](https://hub.docker.com/r/backpackapp/build).
323321

@@ -329,7 +327,7 @@ docker pull backpackapp/build:v0.29.0
329327

330328
**Note:** `anchor build --verifiable` now works with the latest image.
331329

332-
### Enhanced performance
330+
## Enhanced performance
333331

334332
`0.29.0` performance is noticeably improved in all areas, the biggest one being [binary size](https://github.com/coral-xyz/anchor/blob/master/bench/BINARY_SIZE.md#0290) which is reduced ~36% compared to `0.28.0`!
335333

0 commit comments

Comments
 (0)