@@ -70,14 +70,15 @@ const config = {
70
70
locales : ENV . isDeployPreview
71
71
? [ ENV . defaultLocale ]
72
72
: ENV . isI18nStaging
73
- ? [ ENV . defaultLocale , "ru" ]
73
+ ? [ ENV . defaultLocale ]
74
74
: [ ENV . defaultLocale ] ,
75
75
} ,
76
76
77
77
presets : [
78
78
[
79
- "@docusaurus/preset-classic" ,
80
- {
79
+ "classic" ,
80
+ /** @type {import('@docusaurus/preset-classic').Options } */
81
+ ( {
81
82
docs : {
82
83
sidebarPath : require . resolve ( "./sidebars.js" ) ,
83
84
editUrl : ( { locale, docPath } ) =>
@@ -110,15 +111,15 @@ const config = {
110
111
: `https://github.com/${ GITHUB . WEBSITE } /edit/main/${ blogDirPath } /${ blogPath } ` ,
111
112
} ,
112
113
theme : {
113
- customCss : require . resolve ( "./src/css/custom.css" ) ,
114
+ customCss : "./src/css/custom.css" ,
114
115
} ,
115
116
gtag : ! ENV . isDeployPreview
116
117
? {
117
118
trackingID : "G-M51VQVYYQP" ,
118
119
anonymizeIP : true ,
119
120
}
120
121
: undefined ,
121
- } ,
122
+ } ) ,
122
123
] ,
123
124
] ,
124
125
@@ -146,7 +147,7 @@ const config = {
146
147
} ,
147
148
] ,
148
149
[
149
- "@docusaurus/plugin- ideal-image" ,
150
+ "ideal-image" ,
150
151
{
151
152
quality : 70 ,
152
153
max : 1030 ,
@@ -156,7 +157,7 @@ const config = {
156
157
} ,
157
158
] ,
158
159
[
159
- "@docusaurus/plugin- content-docs" ,
160
+ "content-docs" ,
160
161
{
161
162
id : "community" ,
162
163
path : "community" ,
@@ -171,7 +172,7 @@ const config = {
171
172
} ,
172
173
] ,
173
174
[
174
- "@docusaurus/plugin- pwa" ,
175
+ "pwa" ,
175
176
{
176
177
debug : ENV . isDeployPreview ,
177
178
offlineModeActivationStrategies : [
@@ -208,183 +209,185 @@ const config = {
208
209
] ,
209
210
] ,
210
211
211
- themeConfig : {
212
- image : "img/social-card.jpg" ,
213
- colorMode : {
214
- defaultMode : "dark" ,
215
- respectPrefersColorScheme : true ,
216
- } ,
217
- docs : {
218
- sidebar : {
219
- hideable : false ,
220
- autoCollapseCategories : true ,
212
+ themeConfig :
213
+ /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
214
+ ( {
215
+ image : "img/social-card.jpg" ,
216
+ colorMode : {
217
+ defaultMode : "dark" ,
218
+ respectPrefersColorScheme : true ,
221
219
} ,
222
- } ,
223
- announcementBar : {
224
- id : "announcementBar_1" ,
225
- content :
226
- '⭐️ If you like Telegram Bot SDK, give it a star on <a target="_blank" href="https://github.com/telegram-bot-sdk/telegram-bot-sdk">GitHub</a>! ⭐️' ,
227
- } ,
228
- navbar : {
229
- hideOnScroll : false ,
230
- title : "Telegram Bot SDK" ,
231
- logo : {
232
- alt : "Telegram Bot SDK" ,
233
- src : "img/logo.svg" ,
234
- } ,
235
-
236
- items : [
237
- {
238
- type : "doc" ,
239
- docId : "intro" ,
240
- position : "left" ,
241
- label : "📖 Docs" ,
242
- } ,
243
- { to : "/blog" , label : "📝 Blog" , position : "left" } ,
244
- {
245
- to : "/community/support" ,
246
- label : "👥 Community" ,
247
- position : "left" ,
248
- activeBaseRegex : `/community/` ,
220
+ docs : {
221
+ sidebar : {
222
+ hideable : false ,
223
+ autoCollapseCategories : true ,
249
224
} ,
250
- {
251
- href : "https://github.com/telegram-bot-sdk/awesome-telegram-bots" ,
252
- label : "🤖 Showcase Bots" ,
253
- position : "left" ,
254
- } ,
255
- {
256
- type : "docsVersionDropdown" ,
257
- position : "right" ,
258
- dropdownActiveClassDisabled : true ,
259
- dropdownItemsAfter : [
260
- {
261
- type : "html" ,
262
- value : '<hr class="dropdown-separator">' ,
263
- } ,
264
- {
265
- to : "/versions" ,
266
- label : "🗄️ All versions" ,
267
- } ,
268
- ] ,
269
- } ,
270
- {
271
- type : "localeDropdown" ,
272
- position : "right" ,
273
- dropdownItemsAfter : [
274
- {
275
- // Create translation issue.
276
- to : `https://github.com/${ GITHUB . WEBSITE } /issues/123456` ,
277
- label : "🌐 Help us translate" ,
278
- } ,
279
- ] ,
280
- } ,
281
- {
282
- href : `https://github.com/${ GITHUB . REPO } ` ,
283
- position : "right" ,
284
- className : "header-github-link" ,
285
- "aria-label" : "GitHub repository" ,
286
- } ,
287
- ] ,
288
- } ,
289
- footer : {
290
- style : "dark" ,
291
- links : [
292
- {
293
- title : "📚 Learn" ,
294
- items : [
295
- {
296
- label : "👋 Introduction" ,
297
- to : "/docs" ,
298
- } ,
299
- {
300
- label : "🛠️ Installation" ,
301
- to : "docs/getting-started/installation" ,
302
- } ,
303
- {
304
- label : "🔺 Upgrade Guide" ,
305
- to : "docs/upgrade-guide" ,
306
- } ,
307
- {
308
- label : "📝 Blog" ,
309
- to : "/blog" ,
310
- } ,
311
- ] ,
312
- } ,
313
- {
314
- title : "👥 Community" ,
315
- items : [
316
- {
317
- label : "🤝 Support" ,
318
- to : "/community/support" ,
319
- } ,
320
- {
321
- label : "👌 Awesome Resources" ,
322
- to : "/community/resources" ,
323
- } ,
324
- {
325
- label : "📖 Contributing Guide" ,
326
- to : "/community/contributing" ,
327
- } ,
328
- {
329
- label : "💬 PHP Chat on Slack" ,
330
- href : "https://phpchat.co" ,
331
- } ,
332
- {
333
- label : "🐘 PHP Chat on Telegram" ,
334
- href : "https://t.me/PHPChatCo" ,
335
- } ,
336
- ] ,
337
- } ,
338
- {
339
- title : "➕ More" ,
340
- items : [
341
- {
342
- label : "🔄 Changelog" ,
343
- to : "/changelog" ,
344
- } ,
345
- {
346
- label : "🤖 Showcase Bots" ,
347
- href : "https://github.com/telegram-bot-sdk/awesome-telegram-bots" ,
348
- } ,
349
- {
350
- label : "🐙 GitHub (Current)" ,
351
- href : `https://github.com/${ GITHUB . REPO } ` ,
352
- } ,
353
- {
354
- label : "🐙 GitHub (3.x)" ,
355
- href : `https://github.com/${ GITHUB . FORMER_REPO } ` ,
356
- } ,
357
- ] ,
358
- } ,
359
- {
360
- title : "⚖️ Legal" ,
361
- items : [
362
- {
363
- label : "👮♀️ Code of Conduct" ,
364
- to : "/community/code-of-conduct" ,
365
- } ,
366
- {
367
- label : "🔒 Security Policy" ,
368
- to : "/community/security" ,
369
- } ,
370
- {
371
- label : "📃 License" ,
372
- to : "/license" ,
373
- } ,
374
- {
375
- label : "📜 Disclaimer" ,
376
- to : "/license#disclaimer" ,
377
- } ,
378
- ] ,
225
+ } ,
226
+ announcementBar : {
227
+ id : "announcementBar_1" ,
228
+ content :
229
+ '⭐️ If you like Telegram Bot SDK, give it a star on <a target="_blank" href="https://github.com/telegram-bot-sdk/telegram-bot-sdk">GitHub</a>! ⭐️' ,
230
+ } ,
231
+ navbar : {
232
+ hideOnScroll : false ,
233
+ title : "Telegram Bot SDK" ,
234
+ logo : {
235
+ alt : "Telegram Bot SDK" ,
236
+ src : "img/logo.svg" ,
379
237
} ,
380
- ] ,
381
- logo : {
382
- alt : "Telegram Bot SDK" ,
383
- src : "img/robot.png" ,
384
- href : "https://telegram-bot-sdk.com" ,
385
- height : 120 ,
238
+
239
+ items : [
240
+ {
241
+ type : "doc" ,
242
+ docId : "intro" ,
243
+ position : "left" ,
244
+ label : "📖 Docs" ,
245
+ } ,
246
+ { to : "/blog" , label : "📝 Blog" , position : "left" } ,
247
+ {
248
+ to : "/community/support" ,
249
+ label : "👥 Community" ,
250
+ position : "left" ,
251
+ activeBaseRegex : `/community/` ,
252
+ } ,
253
+ {
254
+ href : "https://github.com/telegram-bot-sdk/awesome-telegram-bots" ,
255
+ label : "🤖 Showcase Bots" ,
256
+ position : "left" ,
257
+ } ,
258
+ {
259
+ type : "docsVersionDropdown" ,
260
+ position : "right" ,
261
+ dropdownActiveClassDisabled : true ,
262
+ dropdownItemsAfter : [
263
+ {
264
+ type : "html" ,
265
+ value : '<hr class="dropdown-separator">' ,
266
+ } ,
267
+ {
268
+ to : "/versions" ,
269
+ label : "🗄️ All versions" ,
270
+ } ,
271
+ ] ,
272
+ } ,
273
+ {
274
+ type : "localeDropdown" ,
275
+ position : "right" ,
276
+ dropdownItemsAfter : [
277
+ {
278
+ // Create translation issue.
279
+ to : `https://github.com/${ GITHUB . WEBSITE } /issues/123456` ,
280
+ label : "🌐 Help us translate" ,
281
+ } ,
282
+ ] ,
283
+ } ,
284
+ {
285
+ href : `https://github.com/${ GITHUB . REPO } ` ,
286
+ position : "right" ,
287
+ className : "header-github-link" ,
288
+ "aria-label" : "GitHub repository" ,
289
+ } ,
290
+ ] ,
386
291
} ,
387
- copyright : `
292
+ footer : {
293
+ style : "dark" ,
294
+ links : [
295
+ {
296
+ title : "📚 Learn" ,
297
+ items : [
298
+ {
299
+ label : "👋 Introduction" ,
300
+ to : "/docs" ,
301
+ } ,
302
+ {
303
+ label : "🛠️ Installation" ,
304
+ to : "docs/getting-started/installation" ,
305
+ } ,
306
+ {
307
+ label : "🔺 Upgrade Guide" ,
308
+ to : "docs/upgrade-guide" ,
309
+ } ,
310
+ {
311
+ label : "📝 Blog" ,
312
+ to : "/blog" ,
313
+ } ,
314
+ ] ,
315
+ } ,
316
+ {
317
+ title : "👥 Community" ,
318
+ items : [
319
+ {
320
+ label : "🤝 Support" ,
321
+ to : "/community/support" ,
322
+ } ,
323
+ {
324
+ label : "👌 Awesome Resources" ,
325
+ to : "/community/resources" ,
326
+ } ,
327
+ {
328
+ label : "📖 Contributing Guide" ,
329
+ to : "/community/contributing" ,
330
+ } ,
331
+ {
332
+ label : "💬 PHP Chat on Slack" ,
333
+ href : "https://phpchat.co" ,
334
+ } ,
335
+ {
336
+ label : "🐘 PHP Chat on Telegram" ,
337
+ href : "https://t.me/PHPChatCo" ,
338
+ } ,
339
+ ] ,
340
+ } ,
341
+ {
342
+ title : "➕ More" ,
343
+ items : [
344
+ {
345
+ label : "🔄 Changelog" ,
346
+ to : "/changelog" ,
347
+ } ,
348
+ {
349
+ label : "🤖 Showcase Bots" ,
350
+ href : "https://github.com/telegram-bot-sdk/awesome-telegram-bots" ,
351
+ } ,
352
+ {
353
+ label : "🐙 GitHub (Current)" ,
354
+ href : `https://github.com/${ GITHUB . REPO } ` ,
355
+ } ,
356
+ {
357
+ label : "🐙 GitHub (3.x)" ,
358
+ href : `https://github.com/${ GITHUB . FORMER_REPO } ` ,
359
+ } ,
360
+ ] ,
361
+ } ,
362
+ {
363
+ title : "⚖️ Legal" ,
364
+ items : [
365
+ {
366
+ label : "👮♀️ Code of Conduct" ,
367
+ to : "/community/code-of-conduct" ,
368
+ } ,
369
+ {
370
+ label : "🔒 Security Policy" ,
371
+ to : "/community/security" ,
372
+ } ,
373
+ {
374
+ label : "📃 License" ,
375
+ to : "/license" ,
376
+ } ,
377
+ {
378
+ label : "📜 Disclaimer" ,
379
+ to : "/license#disclaimer" ,
380
+ } ,
381
+ ] ,
382
+ } ,
383
+ ] ,
384
+ logo : {
385
+ alt : "Telegram Bot SDK" ,
386
+ src : "img/robot.png" ,
387
+ href : "https://telegram-bot-sdk.com" ,
388
+ height : 120 ,
389
+ } ,
390
+ copyright : `
388
391
<p>
389
392
Copyright © 2015-${ new Date ( ) . getFullYear ( ) } Telegram Bot SDK for PHP. All rights reserved. • Created by <a target="_blank" href="https://github.com/irazasyed">Irfaq Syed</a>
390
393
</p>
@@ -393,41 +396,41 @@ const config = {
393
396
The Telegram Bot SDK is a third-party library and is not associated with, endorsed by, or affiliated with Telegram or its products.
394
397
</p>
395
398
` ,
396
- } ,
397
- prism : {
398
- theme : themes . github ,
399
- darkTheme : themes . dracula ,
400
- defaultLanguage : "php" ,
401
- additionalLanguages : [ "php" , "diff" , "bash" , "json" ] ,
402
- magicComments : [
403
- {
404
- className : "theme-code-block-highlighted-line" ,
405
- line : "highlight-next-line" ,
406
- block : { start : "highlight-start" , end : "highlight-end" } ,
407
- } ,
408
- {
409
- className : "code-block-error-line" ,
410
- line : "This will error" ,
411
- } ,
412
- ] ,
413
- } ,
414
- algolia : {
415
- appId : "L4ICB0MOQG" ,
416
- apiKey : "3e3d11f655b7eda59f531e8be4d2a6a1" ,
417
- indexName : "telegram-bot-sdk" ,
418
- replaceSearchResultPathname :
419
- ENV . isDev || ENV . isDeployPreview
420
- ? {
421
- from : / ^ \/ d o c s \/ n e x t / g,
422
- to : "/docs" ,
423
- }
424
- : undefined ,
425
- } ,
426
- tableOfContents : {
427
- minHeadingLevel : 2 ,
428
- maxHeadingLevel : 5 ,
429
- } ,
430
- } ,
399
+ } ,
400
+ prism : {
401
+ theme : themes . github ,
402
+ darkTheme : themes . dracula ,
403
+ defaultLanguage : "php" ,
404
+ additionalLanguages : [ "php" , "diff" , "bash" , "json" ] ,
405
+ magicComments : [
406
+ {
407
+ className : "theme-code-block-highlighted-line" ,
408
+ line : "highlight-next-line" ,
409
+ block : { start : "highlight-start" , end : "highlight-end" } ,
410
+ } ,
411
+ {
412
+ className : "code-block-error-line" ,
413
+ line : "This will error" ,
414
+ } ,
415
+ ] ,
416
+ } ,
417
+ algolia : {
418
+ appId : "L4ICB0MOQG" ,
419
+ apiKey : "3e3d11f655b7eda59f531e8be4d2a6a1" ,
420
+ indexName : "telegram-bot-sdk" ,
421
+ replaceSearchResultPathname :
422
+ ENV . isDev || ENV . isDeployPreview
423
+ ? {
424
+ from : / ^ \/ d o c s \/ n e x t / g,
425
+ to : "/docs" ,
426
+ }
427
+ : undefined ,
428
+ } ,
429
+ tableOfContents : {
430
+ minHeadingLevel : 2 ,
431
+ maxHeadingLevel : 5 ,
432
+ } ,
433
+ } ) ,
431
434
} ;
432
435
433
436
export default config ;
0 commit comments