Skip to content

Commit 72d7d01

Browse files
committed
feat: extract navbar
1 parent 98b065f commit 72d7d01

File tree

2 files changed

+283
-281
lines changed

2 files changed

+283
-281
lines changed

docusaurus.config.js

Lines changed: 8 additions & 281 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const getEnvLangConfig = () => {
99
const langArray = process.env.TARGET_LANGS
1010
? process.env.TARGET_LANGS.split(",")
1111
: ["mandarin"];
12-
// : ["mandarin", "ru", "ko", "pl", "uk", "ja"];
12+
// : ["mandarin", "ru", "ko", "pl", "uk", "ja"];
1313

1414
const locales = Array.from(new Set([defaultLocale, ...langArray]));
1515

@@ -29,13 +29,13 @@ const getEnvLangConfig = () => {
2929
};
3030

3131
// function to get current year
32-
function getCurrentYear () {
33-
const now = new Date()
34-
return now.getFullYear()
32+
function getCurrentYear() {
33+
const now = new Date();
34+
return now.getFullYear();
3535
}
3636

3737
// show current year in text
38-
const currentYear = getCurrentYear()
38+
const currentYear = getCurrentYear();
3939

4040
/** @type {import('@docusaurus/types').Config} */
4141
const config = {
@@ -154,280 +154,7 @@ const config = {
154154
// },
155155

156156
image: 'img/snippet.png',
157-
navbar: {
158-
title: '',
159-
logo: {
160-
alt: 'TON',
161-
src: 'img/ton_logo_light_background.svg',
162-
srcDark: 'img/ton_logo_dark_background.svg',
163-
},
164-
items: [
165-
{
166-
type: 'dropdown',
167-
to: '/learn/introduction',
168-
position: 'left',
169-
label: 'Concepts',
170-
items: [
171-
{
172-
to: '/learn/introduction',
173-
label: 'Introduction to TON',
174-
},
175-
{
176-
to: '/learn/overviews/ton-blockchain',
177-
label: 'Blockchain of Blockchains',
178-
},
179-
{
180-
to: '/learn/overviews/addresses',
181-
label: 'Smart Contract Addresses',
182-
},
183-
{
184-
to: '/learn/overviews/cells',
185-
label: 'Cells as a Data Structure',
186-
},
187-
{
188-
to: '/learn/networking/overview',
189-
label: 'TON Networking',
190-
},
191-
{
192-
to: '/learn/docs',
193-
label: 'Whitepapers',
194-
},
195-
196-
],
197-
},
198-
{
199-
type: 'dropdown',
200-
to: '/develop/overview',
201-
position: 'left',
202-
label: 'Get Started',
203-
items: [
204-
{
205-
to: '/develop/overview',
206-
label: 'Start with Onboarding Tutorials',
207-
},
208-
{
209-
to: '/develop/dapps/tutorials/jetton-minter',
210-
label: 'Mint your Tokens',
211-
},
212-
{
213-
to: '/develop/dapps/tutorials/collection-minting',
214-
label: 'Mint your NFTs',
215-
},
216-
{
217-
to: '/develop/dapps/telegram-apps/',
218-
label: 'Build your first Mini App',
219-
},
220-
{
221-
to: '/develop/dapps',
222-
label: 'Dive into DApps Development',
223-
},
224-
],
225-
},
226-
{
227-
type: 'dropdown',
228-
to: 'develop/dapps',
229-
position: 'left',
230-
label: 'DApps',
231-
items: [
232-
{
233-
to: 'develop/dapps/apis/sdk',
234-
label: 'APIs and SDKs',
235-
},
236-
{
237-
to: 'develop/dapps/asset-processing',
238-
label: 'Asset Processing',
239-
},
240-
{
241-
to: 'develop/dapps/asset-processing/jettons',
242-
label: 'Jetton Processing',
243-
},
244-
{
245-
to: '/develop/dapps/cookbook',
246-
label: 'Cookbook',
247-
},
248-
{
249-
to: '/develop/dapps/telegram-apps/',
250-
label: 'TMA Development',
251-
},
252-
],
253-
},
254-
{
255-
type: 'dropdown',
256-
to: 'develop/overview',
257-
position: 'left',
258-
label: 'Smart Contracts',
259-
items: [
260-
{
261-
to: '/develop/smart-contracts/tutorials/wallet',
262-
label: 'Understanding Wallets',
263-
},
264-
{
265-
to: 'develop/smart-contracts',
266-
label: 'Write Smart Contracts',
267-
},
268-
{
269-
to: '/develop/smart-contracts/messages',
270-
label: 'Sending Messages',
271-
},
272-
{
273-
to: 'develop/smart-contracts/fees',
274-
label: 'Transaction Fees',
275-
},
276-
{
277-
to: 'develop/smart-contracts/guidelines',
278-
label: 'Best Practices for Contracts',
279-
},
280-
{
281-
to: 'develop/func/overview',
282-
label: 'FunC Development Language',
283-
},
284-
{
285-
to: 'develop/func/cookbook',
286-
label: 'FunC Cookbook',
287-
},
288-
{
289-
to: '/develop/data-formats/cell-boc',
290-
label: 'Data formats',
291-
},
292-
{
293-
to: 'learn/tvm-instructions/tvm-overview',
294-
label: 'TON Virtual Machine (TVM)',
295-
},
296-
],
297-
},
298-
{
299-
type: 'dropdown',
300-
to: 'participate',
301-
position: 'left',
302-
label: 'Nodes',
303-
items: [
304-
{
305-
to: '/participate/run-nodes/mytonctrl',
306-
label: 'MyTonCtrl',
307-
},
308-
{
309-
to: '/participate/nodes/node-types',
310-
label: 'Node Types',
311-
},
312-
{
313-
to: '/participate/run-nodes/full-node',
314-
label: 'Full Node',
315-
},
316-
{
317-
to: '/participate/run-nodes/enable-liteserver-node',
318-
label: 'Liteserver Node',
319-
},
320-
{
321-
to: '/participate/run-nodes/become-validator',
322-
label: 'Validator Node',
323-
},
324-
{
325-
to: '/participate/run-nodes/archive-node',
326-
label: 'Archive Node',
327-
},
328-
{
329-
to: '/participate/run-nodes/nodes-troubleshooting',
330-
label: 'Troubleshooting the Node',
331-
},
332-
{
333-
to: '/participate/network-maintenance/single-nominator',
334-
label: 'Single Nominator Pool',
335-
},
336-
{
337-
to: '/participate/network-maintenance/nominator-pool',
338-
label: 'Nominator Pool',
339-
},
340-
{
341-
to: '/participate/network-maintenance/vesting-contract',
342-
label: 'Vesting Contract',
343-
},
344-
{
345-
to: '/participate/run-nodes/mytonctrl-status',
346-
label: 'MyTonCtrl Status',
347-
},
348-
{
349-
to: '/participate/run-nodes/faq',
350-
label: 'FAQ',
351-
},
352-
],
353-
},
354-
{
355-
type: 'dropdown',
356-
to: 'participate',
357-
position: 'left',
358-
label: 'Web3',
359-
items: [
360-
{
361-
to: 'participate/web3/dns',
362-
label: 'TON DNS & Domains',
363-
},
364-
{
365-
to: 'participate/web3/how-to-open-any-ton-site',
366-
label: 'Open TON Sites',
367-
},
368-
{
369-
to: 'develop/dapps/tutorials/how-to-run-ton-site',
370-
label: 'Run TON Sites',
371-
},
372-
{
373-
to: 'participate/ton-storage/storage-daemon',
374-
label: 'Run a Storage Daemon',
375-
},
376-
{
377-
to: 'participate/ton-storage/storage-provider',
378-
label: 'Build a Storage Provider',
379-
},
380-
],
381-
},
382-
{
383-
type: 'dropdown',
384-
label: 'Community',
385-
position: 'left',
386-
items: [
387-
{
388-
to: 'https://tonresear.ch/',
389-
label: 'TON Research',
390-
},
391-
{
392-
to: 'https://t.me/addlist/1r5Vcb8eljk5Yzcy',
393-
label: 'TON Developers Kit',
394-
},
395-
{
396-
to: 'https://t.me/tonsupport_aibot',
397-
label: 'AI TON Support Agent',
398-
},
399-
{
400-
to: 'https://github.com/ton-blockchain/TEPs',
401-
label: 'Standards Discussion (TEPs)',
402-
},
403-
{
404-
to: 'contribute',
405-
label: 'Contribute to Docs',
406-
},
407-
],
408-
},
409-
{
410-
href: 'https://github.com/ton-community/ton-docs',
411-
position: 'right',
412-
className: 'header-github-link',
413-
'aria-label': 'GitHub repository',
414-
},
415-
{
416-
type: 'localeDropdown',
417-
position: 'right',
418-
dropdownItemsAfter: [
419-
{
420-
type: 'html',
421-
value: '<hr style="margin: 0.3rem 0;">',
422-
},
423-
{
424-
href: "/contribute/localization-program/overview",
425-
label: 'Help Us Translate',
426-
},
427-
],
428-
},
429-
],
430-
},
157+
navbar: require('./navbar'),
431158
footer: {
432159
// style: 'dark',
433160
// copyright: `Copyright © ${new Date().getFullYear()} TON Foundation`,
@@ -456,6 +183,6 @@ const config = {
456183
// disableSwitch: true,
457184
},
458185
}),
459-
}
186+
};
460187

461-
module.exports = config
188+
module.exports = config;

0 commit comments

Comments
 (0)