Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a4fd215

Browse files
committedOct 8, 2024··
Build error fixes
1 parent 8fc1fa8 commit a4fd215

File tree

5 files changed

+239
-224
lines changed

5 files changed

+239
-224
lines changed
 

‎community/3-contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Please also read our [Code of Conduct](/community/code-of-conduct) before contri
1313

1414
- **Feature requests** first need to be discussed and accepted through an issue before sending in a pull request.
1515
- **Bug fixes** should contain [regression tests](https://laracasts.com/lessons/regression-testing).
16-
- **[Coding standards](#coding-standards)** should be followed.
16+
- **[Coding standards](/community/contributing#coding-standards)** should be followed.
1717
- **Add tests** Ensure that the current tests pass, and if you've added something new, add the tests where relevant.
1818
- **Document any change in behaviour** - Make sure the relevant documentation are up-to-date.
1919
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
2020
- **Create feature branches** - Don't ask us to pull from your master branch.
2121
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
2222
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.
2323

24-
## 👨‍💻 Coding Standards {#coding-standard}
24+
## 👨‍💻 Coding Standards {#coding-standards}
2525

2626
- [PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/) will automatically be applied by Github Actions.
2727
- Make sure to typehint and declare return type where applicable.

‎community/7-release-process.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Whenever a new major version is released, we publish:
3535

3636
:::tip
3737

38-
Read our [public API surface](#public-api-surface) section to clearly understand what we consider as a breaking change.
38+
Read our [public API surface](/community/release-process#public-api-surface) section to clearly understand what we consider as a breaking change.
3939

4040
:::
4141

@@ -50,7 +50,7 @@ Whenever a new minor version is released, we publish:
5050

5151
:::tip
5252

53-
If you only use our [public API surface](##public-api-surface), you should be able to upgrade in no time!
53+
If you only use our [public API surface](/community/release-process#public-api-surface), you should be able to upgrade in no time!
5454

5555
:::
5656

‎docusaurus.config.js

Lines changed: 219 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,15 @@ const config = {
7070
locales: ENV.isDeployPreview
7171
? [ENV.defaultLocale]
7272
: ENV.isI18nStaging
73-
? [ENV.defaultLocale, "ru"]
73+
? [ENV.defaultLocale]
7474
: [ENV.defaultLocale],
7575
},
7676

7777
presets: [
7878
[
79-
"@docusaurus/preset-classic",
80-
{
79+
"classic",
80+
/** @type {import('@docusaurus/preset-classic').Options} */
81+
({
8182
docs: {
8283
sidebarPath: require.resolve("./sidebars.js"),
8384
editUrl: ({ locale, docPath }) =>
@@ -110,15 +111,15 @@ const config = {
110111
: `https://github.com/${GITHUB.WEBSITE}/edit/main/${blogDirPath}/${blogPath}`,
111112
},
112113
theme: {
113-
customCss: require.resolve("./src/css/custom.css"),
114+
customCss: "./src/css/custom.css",
114115
},
115116
gtag: !ENV.isDeployPreview
116117
? {
117118
trackingID: "G-M51VQVYYQP",
118119
anonymizeIP: true,
119120
}
120121
: undefined,
121-
},
122+
}),
122123
],
123124
],
124125

@@ -146,7 +147,7 @@ const config = {
146147
},
147148
],
148149
[
149-
"@docusaurus/plugin-ideal-image",
150+
"ideal-image",
150151
{
151152
quality: 70,
152153
max: 1030,
@@ -156,7 +157,7 @@ const config = {
156157
},
157158
],
158159
[
159-
"@docusaurus/plugin-content-docs",
160+
"content-docs",
160161
{
161162
id: "community",
162163
path: "community",
@@ -171,7 +172,7 @@ const config = {
171172
},
172173
],
173174
[
174-
"@docusaurus/plugin-pwa",
175+
"pwa",
175176
{
176177
debug: ENV.isDeployPreview,
177178
offlineModeActivationStrategies: [
@@ -208,183 +209,185 @@ const config = {
208209
],
209210
],
210211

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,
221219
},
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,
249224
},
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",
379237
},
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+
],
386291
},
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: `
388391
<p>
389392
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>
390393
</p>
@@ -393,41 +396,41 @@ const config = {
393396
The Telegram Bot SDK is a third-party library and is not associated with, endorsed by, or affiliated with Telegram or its products.
394397
</p>
395398
`,
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: /^\/docs\/next/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: /^\/docs\/next/g,
425+
to: "/docs",
426+
}
427+
: undefined,
428+
},
429+
tableOfContents: {
430+
minHeadingLevel: 2,
431+
maxHeadingLevel: 5,
432+
},
433+
}),
431434
};
432435

433436
export default config;

‎package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@
2929
"clsx": "^2.1.1",
3030
"prism-react-renderer": "^2.4.0",
3131
"react": "^18.3.1",
32-
"react-dom": "^18.3.1"
32+
"react-dom": "^18.3.1",
33+
"workbox-routing": "^7.1.0",
34+
"workbox-strategies": "^7.1.0"
3335
},
3436
"devDependencies": {
3537
"@docusaurus/module-type-aliases": "^3.5.2",
3638
"@docusaurus/types": "^3.5.2",
3739
"all-contributors-cli": "^6.26.1",
40+
"babel-loader": "^9.2.1",
3841
"cross-env": "^7.0.3"
3942
},
4043
"browserslist": {
@@ -44,9 +47,9 @@
4447
"not op_mini all"
4548
],
4649
"development": [
47-
"last 1 chrome version",
48-
"last 1 firefox version",
49-
"last 1 safari version"
50+
"last 3 chrome version",
51+
"last 3 firefox version",
52+
"last 5 safari version"
5053
]
5154
},
5255
"engines": {

‎pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.