|
1 | 1 | import { themes as prismThemes } from "prism-react-renderer"; |
2 | | -const footer = require("./footerConfig"); |
3 | | -const navbar = require("./navbarConfig"); |
| 2 | +const footer = require('./footerConfig'); |
| 3 | +const navbar = require('./navbarConfig'); |
4 | 4 |
|
5 | 5 | /** @type {import('@docusaurus/types').Config} */ |
6 | 6 | const config = { |
7 | | - title: "Java Slack SDK", |
8 | | - tagline: "Java Slack SDK", |
9 | | - favicon: "img/favicon.ico", |
| 7 | + title: "Java Slack SDK", |
| 8 | + tagline: "Java Slack SDK", |
| 9 | + favicon: "img/favicon.ico", |
10 | 10 |
|
11 | | - url: "https://tools.slack.dev", |
12 | | - baseUrl: "/java-slack-sdk/", |
13 | | - organizationName: "slackapi", |
14 | | - projectName: "java-slack-sdk", |
| 11 | + url: "https://tools.slack.dev", |
| 12 | + baseUrl: "/java-slack-sdk/", |
| 13 | + organizationName: "slackapi", |
| 14 | + projectName: "java-slack-sdk", |
15 | 15 |
|
16 | | - onBrokenLinks: "warn", |
17 | | - onBrokenAnchors: "ignore", |
18 | | - onBrokenMarkdownLinks: "warn", |
| 16 | + onBrokenLinks: "warn", |
| 17 | + onBrokenAnchors: "ignore", |
| 18 | + onBrokenMarkdownLinks: "warn", |
19 | 19 |
|
20 | | - i18n: { |
21 | | - defaultLocale: "en", |
22 | | - locales: ["en", "ja-jp"], |
23 | | - }, |
| 20 | + i18n: { |
| 21 | + defaultLocale: "en", |
| 22 | + locales: ["en", "ja-jp"], |
| 23 | + }, |
24 | 24 |
|
25 | | - presets: [ |
26 | | - [ |
27 | | - "classic", |
28 | | - /** @type {import('@docusaurus/preset-classic').Options} */ |
29 | | - ({ |
30 | | - docs: { |
31 | | - path: "content", |
32 | | - breadcrumbs: false, |
33 | | - routeBasePath: "/", // Serve the docs at the site's root |
34 | | - sidebarPath: "./sidebars.js", |
35 | | - editUrl: "https://github.com/slackapi/java-slack-sdk/tree/main/docs", |
36 | | - }, |
37 | | - blog: false, |
38 | | - theme: { |
39 | | - customCss: "./src/css/custom.css", |
40 | | - }, |
41 | | - gtag: { |
42 | | - trackingID: "G-9H1YZW28BG", |
43 | | - }, |
44 | | - }), |
45 | | - ], |
46 | | - ], |
| 25 | + presets: [ |
| 26 | + [ |
| 27 | + "classic", |
| 28 | + /** @type {import('@docusaurus/preset-classic').Options} */ |
| 29 | + ({ |
| 30 | + docs: { |
| 31 | + path: "content", |
| 32 | + breadcrumbs: false, |
| 33 | + routeBasePath: "/", // Serve the docs at the site's root |
| 34 | + sidebarPath: "./sidebars.js", |
| 35 | + editUrl: "https://github.com/slackapi/java-slack-sdk/tree/main/docs", |
| 36 | + }, |
| 37 | + blog: false, |
| 38 | + theme: { |
| 39 | + customCss: "./src/css/custom.css", |
| 40 | + }, |
| 41 | + }), |
| 42 | + ], |
| 43 | + ], |
47 | 44 |
|
48 | | - plugins: [ |
49 | | - "docusaurus-theme-github-codeblock", |
50 | | - [ |
51 | | - "@docusaurus/plugin-client-redirects", |
52 | | - { |
53 | | - redirects: [], |
54 | | - createRedirects(existingPath) { |
55 | | - if (existingPath.includes("/guides")) { |
56 | | - // Redirect from /guides/ja/X to /guides/X |
57 | | - return [existingPath.replace("/guides", "/guides/ja")]; |
58 | | - } |
59 | | - return undefined; // Return a falsy value: no redirect created |
60 | | - }, |
61 | | - }, |
62 | | - ], |
63 | | - ], |
| 45 | + plugins: [ |
| 46 | + "docusaurus-theme-github-codeblock", |
| 47 | + [ |
| 48 | + "@docusaurus/plugin-client-redirects", |
| 49 | + { |
| 50 | + redirects: [ |
| 51 | + ], |
| 52 | + createRedirects(existingPath) { |
| 53 | + if (existingPath.includes('/guides')) { |
| 54 | + // Redirect from /guides/ja/X to /guides/X |
| 55 | + return [ |
| 56 | + existingPath.replace('/guides', '/guides/ja'), |
| 57 | + ]; |
| 58 | + } |
| 59 | + return undefined; // Return a falsy value: no redirect created |
| 60 | + } |
| 61 | + } |
| 62 | + ] |
| 63 | + ], |
64 | 64 |
|
65 | | - themeConfig: |
66 | | - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
67 | | - ({ |
68 | | - colorMode: { |
69 | | - respectPrefersColorScheme: true, |
70 | | - }, |
71 | | - docs: { |
72 | | - sidebar: { |
73 | | - autoCollapseCategories: true, |
74 | | - }, |
75 | | - }, |
76 | | - navbar, |
77 | | - footer, |
78 | | - prism: { |
79 | | - additionalLanguages: ["java", "groovy"], |
80 | | - // switch to alucard when available in prism? |
81 | | - theme: prismThemes.github, |
82 | | - darkTheme: prismThemes.dracula, |
83 | | - }, |
84 | | - codeblock: { |
85 | | - showGithubLink: true, |
86 | | - githubLinkLabel: "View on GitHub", |
87 | | - }, |
88 | | - // announcementBar: { |
89 | | - // id: `announcementBar`, |
90 | | - // content: `🎉️ <b><a target="_blank" href="https://api.slack.com/">Version 2.26.0</a> of the developer tools for the Slack automations platform is here!</b> 🎉️ `, |
91 | | - // }, |
92 | | - }), |
| 65 | + themeConfig: |
| 66 | + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
| 67 | + ({ |
| 68 | + colorMode: { |
| 69 | + respectPrefersColorScheme: true, |
| 70 | + }, |
| 71 | + docs: { |
| 72 | + sidebar: { |
| 73 | + autoCollapseCategories: true, |
| 74 | + }, |
| 75 | + }, |
| 76 | + navbar, |
| 77 | + footer, |
| 78 | + prism: { |
| 79 | + additionalLanguages: ['java','groovy'], |
| 80 | + // switch to alucard when available in prism? |
| 81 | + theme: prismThemes.github, |
| 82 | + darkTheme: prismThemes.dracula, |
| 83 | + }, |
| 84 | + codeblock: { |
| 85 | + showGithubLink: true, |
| 86 | + githubLinkLabel: "View on GitHub", |
| 87 | + }, |
| 88 | + // announcementBar: { |
| 89 | + // id: `announcementBar`, |
| 90 | + // content: `🎉️ <b><a target="_blank" href="https://api.slack.com/">Version 2.26.0</a> of the developer tools for the Slack automations platform is here!</b> 🎉️ `, |
| 91 | + // }, |
| 92 | + }), |
93 | 93 | }; |
94 | 94 |
|
95 | 95 | export default config; |
0 commit comments