Skip to content

Commit

Permalink
fix(docs): handle prev and next buttons on the bottom correctly in pr…
Browse files Browse the repository at this point in the history
…esence of sidebar separator items
  • Loading branch information
novusnota committed Oct 13, 2024
1 parent 64ab776 commit dd6457e
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Docs: layout of tables, syntax highlighting, Chinese translations of sidebar separators: PR [#916](https://github.com/tact-lang/tact/pull/916)
- 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)
- Prevent inline code snippets from changing their background color: PR [#935](https://github.com/tact-lang/tact/pull/935)
- 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)

### Release contributors

Expand Down
27 changes: 18 additions & 9 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ export default defineConfig({
{
label: 'Fundamentals of Tact',
translations: { 'zh-CN': 'Tact 语言基础' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'book/types#',
},
{ slug: 'book/types' },
{ slug: 'book/integers' },
Expand All @@ -150,7 +151,8 @@ export default defineConfig({
{
label: 'Expressiveness',
translations: { 'zh-CN': '表现力' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'book/operators#',
},
{ slug: 'book/operators' },
{ slug: 'book/expressions' },
Expand All @@ -160,7 +162,8 @@ export default defineConfig({
{
label: 'Communication',
translations: { 'zh-CN': '交流' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'book/receive#',
},
{ slug: 'book/receive' },
{ slug: 'book/bounced' },
Expand All @@ -171,7 +174,8 @@ export default defineConfig({
{
label: 'Going places',
translations: { 'zh-CN': '前往各地' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'book/deploy#',
},
{ slug: 'book/deploy' },
{ slug: 'book/debug' },
Expand All @@ -193,7 +197,8 @@ export default defineConfig({
{
label: 'Single contract',
translations: { 'zh-CN': '单一合同' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'cookbook/single-communication#',
},
{ slug: 'cookbook/single-communication' },
{ slug: 'cookbook/type-conversion' },
Expand All @@ -206,7 +211,8 @@ export default defineConfig({
{
label: 'Multiple contracts',
translations: { 'zh-CN': '多重合同' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'cookbook/multi-communication#',
},
{ slug: 'cookbook/multi-communication' },
{ slug: 'cookbook/jettons' },
Expand Down Expand Up @@ -240,7 +246,8 @@ export default defineConfig({
{
label: 'Core library',
translations: { 'zh-CN': '核心图书馆' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'ref/core-base#',
},
{ slug: 'ref/core-base' },
{ slug: 'ref/core-common' },
Expand All @@ -254,7 +261,8 @@ export default defineConfig({
{
label: 'Standard libraries',
translations: { 'zh-CN': '标准图书馆' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'ref/standard-libraries#',
},
{ slug: 'ref/standard-libraries' },
{ slug: 'ref/stdlib-config' },
Expand All @@ -275,7 +283,8 @@ export default defineConfig({
{
label: 'Tools',
translations: { 'zh-CN': '工具' },
link: '#', attrs: { class: 'sidebar-separator' }
attrs: { class: 'sidebar-separator' },
link: 'ecosystem/typescript#',
},
{ slug: 'ecosystem/typescript' },
{ slug: 'ecosystem/vscode' },
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/book/deploy.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Deployment
description: "Common ways to deploy Tact contracts to testnet or mainnet of TON Blockchain"
prev:
link: /book/message-mode
label: Message mode
---

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.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/book/operators.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Operators
description: "This page lists all the operators in Tact in decreasing order of their precedence, with examples of usage"
prev:
link: /book/exit-codes
label: Exit codes
---

Almost every contract operates on data: transforms some values into another. Scope may vary, but operators lay in core of such modifications.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/book/receive.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Receive messages
description: "The most common type of messages is the internal message - a message sent from one contract to another"
prev:
link: /book/functions
label: Functions
---

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.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/book/types.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Type system overview
description: "Every variable, item, and value in Tact programs has a type"
prev:
link: /book/cs/from-solidity
label: Coming from Solidity
---

Every variable, item, and value in Tact programs has a type. They can be:
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/cookbook/multi-communication.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Multi-contract communication
description: "Common examples of communication between many deployed contracts on blockchain"
prev:
link: /cookbook/misc
label: Miscellaneous
---

:::danger[Not implemented]
Expand Down
5 changes: 4 additions & 1 deletion docs/src/content/docs/cookbook/single-communication.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Single-contract Communication
title: Single-contract communication
description: "Common examples of communication of a single deployed contract with other contracts on blockchain"
prev:
link: /cookbook
label: Cookbook overview
---

This page lists examples of communication of a single deployed contract with other contracts on blockchain.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/ecosystem/typescript.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: TypeScript libraries
description: "The compiler of Tact automatically generates wrapper code for use with @ton/ton and @ton/core libraries"
prev:
link: /ecosystem
label: Ecosystem overview
---

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.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/ref/core-base.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Base trait
description: "Every contract and trait in Tact implicitly inherits the BaseTrait trait"
prev:
link: /ref/evolution/otp-006
label: "OTP-006: Contract Package"
---

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.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/content/docs/ref/standard-libraries.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: Standard libraries overview
description: "Some libraries come bundled with Tact compiler, but aren't automatically included to your project until explicitly made to"
prev:
link: /ref/core-advanced
label: Advanced
---

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.
Expand Down

0 comments on commit dd6457e

Please sign in to comment.