Skip to content

Commit b7038c9

Browse files
authored
fix(docs): handle prev and next buttons on the bottom correctly in presence of sidebar separator items (#949)
1 parent 64ab776 commit b7038c9

11 files changed

+47
-10
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Docs: layout of tables, syntax highlighting, Chinese translations of sidebar separators: PR [#916](https://github.com/tact-lang/tact/pull/916)
2626
- Non-null struct fields after null ones are treated correctly in Sandbox tests after updating `@ton/core` to 0.59.0: PR [#933](https://github.com/tact-lang/tact/pull/933)
2727
- Prevent inline code snippets from changing their background color: PR [#935](https://github.com/tact-lang/tact/pull/935)
28+
- Docs: correctly handle next and previous page links at the bottom of the pages when there's a separator item in the sidebar: PR [#949](https://github.com/tact-lang/tact/pull/949)
2829

2930
### Release contributors
3031

docs/astro.config.mjs

+18-9
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export default defineConfig({
137137
{
138138
label: 'Fundamentals of Tact',
139139
translations: { 'zh-CN': 'Tact 语言基础' },
140-
link: '#', attrs: { class: 'sidebar-separator' }
140+
attrs: { class: 'sidebar-separator' },
141+
link: 'book/types#',
141142
},
142143
{ slug: 'book/types' },
143144
{ slug: 'book/integers' },
@@ -150,7 +151,8 @@ export default defineConfig({
150151
{
151152
label: 'Expressiveness',
152153
translations: { 'zh-CN': '表现力' },
153-
link: '#', attrs: { class: 'sidebar-separator' }
154+
attrs: { class: 'sidebar-separator' },
155+
link: 'book/operators#',
154156
},
155157
{ slug: 'book/operators' },
156158
{ slug: 'book/expressions' },
@@ -160,7 +162,8 @@ export default defineConfig({
160162
{
161163
label: 'Communication',
162164
translations: { 'zh-CN': '交流' },
163-
link: '#', attrs: { class: 'sidebar-separator' }
165+
attrs: { class: 'sidebar-separator' },
166+
link: 'book/receive#',
164167
},
165168
{ slug: 'book/receive' },
166169
{ slug: 'book/bounced' },
@@ -171,7 +174,8 @@ export default defineConfig({
171174
{
172175
label: 'Going places',
173176
translations: { 'zh-CN': '前往各地' },
174-
link: '#', attrs: { class: 'sidebar-separator' }
177+
attrs: { class: 'sidebar-separator' },
178+
link: 'book/deploy#',
175179
},
176180
{ slug: 'book/deploy' },
177181
{ slug: 'book/debug' },
@@ -193,7 +197,8 @@ export default defineConfig({
193197
{
194198
label: 'Single contract',
195199
translations: { 'zh-CN': '单一合同' },
196-
link: '#', attrs: { class: 'sidebar-separator' }
200+
attrs: { class: 'sidebar-separator' },
201+
link: 'cookbook/single-communication#',
197202
},
198203
{ slug: 'cookbook/single-communication' },
199204
{ slug: 'cookbook/type-conversion' },
@@ -206,7 +211,8 @@ export default defineConfig({
206211
{
207212
label: 'Multiple contracts',
208213
translations: { 'zh-CN': '多重合同' },
209-
link: '#', attrs: { class: 'sidebar-separator' }
214+
attrs: { class: 'sidebar-separator' },
215+
link: 'cookbook/multi-communication#',
210216
},
211217
{ slug: 'cookbook/multi-communication' },
212218
{ slug: 'cookbook/jettons' },
@@ -240,7 +246,8 @@ export default defineConfig({
240246
{
241247
label: 'Core library',
242248
translations: { 'zh-CN': '核心图书馆' },
243-
link: '#', attrs: { class: 'sidebar-separator' }
249+
attrs: { class: 'sidebar-separator' },
250+
link: 'ref/core-base#',
244251
},
245252
{ slug: 'ref/core-base' },
246253
{ slug: 'ref/core-common' },
@@ -254,7 +261,8 @@ export default defineConfig({
254261
{
255262
label: 'Standard libraries',
256263
translations: { 'zh-CN': '标准图书馆' },
257-
link: '#', attrs: { class: 'sidebar-separator' }
264+
attrs: { class: 'sidebar-separator' },
265+
link: 'ref/standard-libraries#',
258266
},
259267
{ slug: 'ref/standard-libraries' },
260268
{ slug: 'ref/stdlib-config' },
@@ -275,7 +283,8 @@ export default defineConfig({
275283
{
276284
label: 'Tools',
277285
translations: { 'zh-CN': '工具' },
278-
link: '#', attrs: { class: 'sidebar-separator' }
286+
attrs: { class: 'sidebar-separator' },
287+
link: 'ecosystem/typescript#',
279288
},
280289
{ slug: 'ecosystem/typescript' },
281290
{ slug: 'ecosystem/vscode' },

docs/src/content/docs/book/deploy.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Deployment
33
description: "Common ways to deploy Tact contracts to testnet or mainnet of TON Blockchain"
4+
prev:
5+
link: /book/message-mode
6+
label: Message mode
47
---
58

69
Tact Deployer is a small library that integrates with [TON Verifier](https://verifier.ton.org) that allows you to deploy your contracts safely using your favorite wallet without needing to manage keys or deploy contracts manually. Tact Deployer also automatically verifies your contract's source code and you can be sure that your compiler is not compromised.

docs/src/content/docs/book/operators.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Operators
33
description: "This page lists all the operators in Tact in decreasing order of their precedence, with examples of usage"
4+
prev:
5+
link: /book/exit-codes
6+
label: Exit codes
47
---
58

69
Almost every contract operates on data: transforms some values into another. Scope may vary, but operators lay in core of such modifications.

docs/src/content/docs/book/receive.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Receive messages
33
description: "The most common type of messages is the internal message - a message sent from one contract to another"
4+
prev:
5+
link: /book/functions
6+
label: Functions
47
---
58

69
TON is a distributed blockchain which means that communication between contracts is done by sending and receiving messages. The most common type of messages is the internal message - a message sent from one contract (or a wallet) to another.

docs/src/content/docs/book/types.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Type system overview
33
description: "Every variable, item, and value in Tact programs has a type"
4+
prev:
5+
link: /book/cs/from-solidity
6+
label: Coming from Solidity
47
---
58

69
Every variable, item, and value in Tact programs has a type. They can be:

docs/src/content/docs/cookbook/multi-communication.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Multi-contract communication
33
description: "Common examples of communication between many deployed contracts on blockchain"
4+
prev:
5+
link: /cookbook/misc
6+
label: Miscellaneous
47
---
58

69
:::danger[Not implemented]

docs/src/content/docs/cookbook/single-communication.mdx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
2-
title: Single-contract Communication
2+
title: Single-contract communication
33
description: "Common examples of communication of a single deployed contract with other contracts on blockchain"
4+
prev:
5+
link: /cookbook
6+
label: Cookbook overview
47
---
58

69
This page lists examples of communication of a single deployed contract with other contracts on blockchain.

docs/src/content/docs/ecosystem/typescript.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: TypeScript libraries
33
description: "The compiler of Tact automatically generates wrapper code for use with @ton/ton and @ton/core libraries"
4+
prev:
5+
link: /ecosystem
6+
label: Ecosystem overview
47
---
58

69
The Tact language has built-in support for the [@ton/ton](https://github.com/ton-org/ton) and [@ton/core](https://github.com/ton-org/ton-core) TypeScript libraries. The compiler automatically generates code for these libraries, so you can use [@tact-lang/emulator](https://github.com/tact-lang/tact-emulator) or [@ton/sandbox](https://github.com/ton-org/sandbox), that work on top of them.

docs/src/content/docs/ref/core-base.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Base trait
33
description: "Every contract and trait in Tact implicitly inherits the BaseTrait trait"
4+
prev:
5+
link: /ref/evolution/otp-006
6+
label: "OTP-006: Contract Package"
47
---
58

69
Every [contract](/book/contracts) and [trait](/book/types#traits) in Tact implicitly [inherits](/book/contracts#traits) the `BaseTrait{:tact}` trait, which contains a number of the most useful [internal functions](/book/contracts#internal-functions) for any kind of contract, and a constant `self.storageReserve{:tact}` aimed at advanced users of Tact.

docs/src/content/docs/ref/standard-libraries.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Standard libraries overview
33
description: "Some libraries come bundled with Tact compiler, but aren't automatically included to your project until explicitly made to"
4+
prev:
5+
link: /ref/core-advanced
6+
label: Advanced
47
---
58

69
Some libraries (also referred to as standard libraries or stdlibs) come bundled with Tact compiler, but aren't automatically included to your project until explicitly made to.

0 commit comments

Comments
 (0)