|
1 | | -// @ts-check |
2 | | -// `@type` JSDoc annotations allow editor autocompletion and type checking |
3 | | -// (when paired with `@ts-check`). |
4 | | -// There are various equivalent ways to declare your Docusaurus config. |
5 | | -// See: https://docusaurus.io/docs/api/docusaurus-config |
6 | | - |
7 | 1 | import { themes as prismThemes } from "prism-react-renderer"; |
| 2 | +const footer = require("./footerConfig"); |
| 3 | +const navbar = require("./navbarConfig"); |
8 | 4 |
|
9 | 5 | /** @type {import('@docusaurus/types').Config} */ |
10 | 6 | const config = { |
11 | | - title: "Python Slack SDK", |
12 | | - tagline: "Official frameworks, libraries, and SDKs for Slack developers", |
13 | | - favicon: "img/favicon.ico", |
14 | | - |
15 | | - url: "https://tools.slack.dev", |
16 | | - baseUrl: "/python-slack-sdk/", |
17 | | - organizationName: "slackapi", |
18 | | - projectName: "python-slack-sdk", |
| 7 | + title: "Python Slack SDK", |
| 8 | + tagline: "Official frameworks, libraries, and SDKs for Slack developers", |
| 9 | + favicon: "img/favicon.ico", |
| 10 | + url: "https://tools.slack.dev", |
| 11 | + baseUrl: "/python-slack-sdk/", |
| 12 | + organizationName: "slackapi", |
| 13 | + projectName: "python-slack-sdk", |
19 | 14 |
|
20 | | - onBrokenLinks: "warn", |
21 | | - onBrokenAnchors: "warn", |
22 | | - onBrokenMarkdownLinks: "warn", |
| 15 | + onBrokenLinks: "warn", |
| 16 | + onBrokenAnchors: "warn", |
| 17 | + onBrokenMarkdownLinks: "warn", |
23 | 18 |
|
24 | | - i18n: { |
25 | | - defaultLocale: "en", |
26 | | - locales: ["en"], |
27 | | - }, |
| 19 | + i18n: { |
| 20 | + defaultLocale: "en", |
| 21 | + locales: ["en"], |
| 22 | + }, |
28 | 23 |
|
29 | | - presets: [ |
30 | | - [ |
31 | | - "classic", |
32 | | - /** @type {import('@docusaurus/preset-classic').Options} */ |
33 | | - ({ |
34 | | - docs: { |
35 | | - path: "content", |
36 | | - breadcrumbs: false, |
37 | | - routeBasePath: "/", // Serve the docs at the site's root |
38 | | - sidebarPath: "./sidebars.js", |
39 | | - editUrl: |
40 | | - "https://github.com/slackapi/python-slack-sdk/tree/main/docs", |
41 | | - }, |
42 | | - blog: false, |
43 | | - theme: { |
44 | | - customCss: "./src/css/custom.css", |
45 | | - }, |
46 | | - gtag: { |
47 | | - trackingID: "G-9H1YZW28BG", |
48 | | - }, |
49 | | - }), |
50 | | - ], |
51 | | - ], |
| 24 | + presets: [ |
| 25 | + [ |
| 26 | + "classic", |
| 27 | + /** @type {import('@docusaurus/preset-classic').Options} */ |
| 28 | + ({ |
| 29 | + docs: { |
| 30 | + path: "content", |
| 31 | + breadcrumbs: false, |
| 32 | + routeBasePath: "/", // Serve the docs at the site's root |
| 33 | + sidebarPath: "./sidebars.js", |
| 34 | + editUrl: |
| 35 | + "https://github.com/slackapi/python-slack-sdk/tree/main/docs", |
| 36 | + }, |
| 37 | + blog: false, |
| 38 | + theme: { |
| 39 | + customCss: "./src/css/custom.css", |
| 40 | + }, |
| 41 | + }), |
| 42 | + ], |
| 43 | + ], |
52 | 44 |
|
53 | | - plugins: [ |
54 | | - "docusaurus-theme-github-codeblock", |
55 | | - [ |
56 | | - "@docusaurus/plugin-client-redirects", |
57 | | - { |
58 | | - redirects: [], |
59 | | - }, |
60 | | - ], |
61 | | - ], |
| 45 | + plugins: [ |
| 46 | + "docusaurus-theme-github-codeblock", |
| 47 | + [ |
| 48 | + "@docusaurus/plugin-client-redirects", |
| 49 | + { |
| 50 | + redirects: [], |
| 51 | + }, |
| 52 | + ], |
| 53 | + ], |
62 | 54 |
|
63 | | - themeConfig: |
64 | | - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
65 | | - ({ |
66 | | - colorMode: { |
67 | | - respectPrefersColorScheme: true, |
68 | | - }, |
69 | | - docs: { |
70 | | - sidebar: { |
71 | | - autoCollapseCategories: true, |
72 | | - }, |
73 | | - }, |
74 | | - navbar: { |
75 | | - title: "Slack Developer Tools", |
76 | | - logo: { |
77 | | - alt: "Slack logo", |
78 | | - src: "img/slack-logo.svg", |
79 | | - href: "https://tools.slack.dev", |
80 | | - target: "_self", |
81 | | - }, |
82 | | - items: [ |
83 | | - { |
84 | | - type: "dropdown", |
85 | | - label: "Bolt", |
86 | | - position: "left", |
87 | | - items: [ |
88 | | - { |
89 | | - label: "Java", |
90 | | - to: "https://tools.slack.dev/java-slack-sdk/guides/bolt-basics", |
91 | | - target: "_self", |
92 | | - }, |
93 | | - { |
94 | | - label: "JavaScript", |
95 | | - to: "https://tools.slack.dev/bolt-js", |
96 | | - target: "_self", |
97 | | - }, |
98 | | - { |
99 | | - label: "Python", |
100 | | - to: "https://tools.slack.dev/bolt-python", |
101 | | - target: "_self", |
102 | | - }, |
103 | | - ], |
104 | | - }, |
105 | | - { |
106 | | - type: "dropdown", |
107 | | - label: "SDKs", |
108 | | - position: "left", |
109 | | - items: [ |
110 | | - { |
111 | | - label: "Java Slack SDK", |
112 | | - to: "https://tools.slack.dev/java-slack-sdk/", |
113 | | - target: "_self", |
114 | | - }, |
115 | | - { |
116 | | - label: "Node Slack SDK", |
117 | | - to: "https://tools.slack.dev/node-slack-sdk/", |
118 | | - target: "_self", |
119 | | - }, |
120 | | - { |
121 | | - label: "Python Slack SDK", |
122 | | - to: "https://tools.slack.dev/python-slack-sdk/", |
123 | | - target: "_self", |
124 | | - }, |
125 | | - { |
126 | | - label: "Deno Slack SDK", |
127 | | - to: "https://api.slack.com/automation/quickstart", |
128 | | - target: "_self", |
129 | | - }, |
130 | | - ], |
131 | | - }, |
132 | | - { |
133 | | - type: "dropdown", |
134 | | - label: "Community", |
135 | | - position: "left", |
136 | | - items: [ |
137 | | - { |
138 | | - label: "Community tools", |
139 | | - to: "https://tools.slack.dev/community-tools", |
140 | | - target: "_self", |
141 | | - }, |
142 | | - { |
143 | | - label: "Slack Community", |
144 | | - to: "https://slackcommunity.com/", |
145 | | - target: "_self", |
146 | | - }, |
147 | | - ], |
148 | | - }, |
149 | | - { |
150 | | - to: "https://api.slack.com/docs", |
151 | | - label: "API Docs", |
152 | | - target: "_self", |
153 | | - }, |
154 | | - { |
155 | | - type: "localeDropdown", |
156 | | - position: "right", |
157 | | - }, |
158 | | - { |
159 | | - "aria-label": "GitHub Repository", |
160 | | - className: "navbar-github-link", |
161 | | - href: "https://github.com/slackapi/python-slack-sdk", |
162 | | - position: "right", |
163 | | - target: "_self", |
164 | | - }, |
165 | | - ], |
166 | | - }, |
167 | | - footer: { |
168 | | - copyright: `<p> Made with ♡ by Slack and pals like you <p>`, |
169 | | - }, |
170 | | - prism: { |
171 | | - // switch to alucard when available in prism? |
172 | | - theme: prismThemes.github, |
173 | | - darkTheme: prismThemes.dracula, |
174 | | - }, |
175 | | - codeblock: { |
176 | | - showGithubLink: true, |
177 | | - githubLinkLabel: "View on GitHub", |
178 | | - }, |
179 | | - // announcementBar: { |
180 | | - // id: `announcementBar`, |
181 | | - // 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> 🎉️ `, |
182 | | - // }, |
183 | | - }), |
| 55 | + themeConfig: |
| 56 | + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
| 57 | + ({ |
| 58 | + colorMode: { |
| 59 | + respectPrefersColorScheme: true, |
| 60 | + }, |
| 61 | + docs: { |
| 62 | + sidebar: { |
| 63 | + autoCollapseCategories: true, |
| 64 | + }, |
| 65 | + }, |
| 66 | + navbar, |
| 67 | + footer, |
| 68 | + prism: { |
| 69 | + // switch to alucard when available in prism? |
| 70 | + theme: prismThemes.github, |
| 71 | + darkTheme: prismThemes.dracula, |
| 72 | + }, |
| 73 | + codeblock: { |
| 74 | + showGithubLink: true, |
| 75 | + githubLinkLabel: "View on GitHub", |
| 76 | + }, |
| 77 | + // announcementBar: { |
| 78 | + // id: `announcementBar`, |
| 79 | + // content: `🎉️ <b><a target="_blank" href="https://api.slack.com/">Version 2.26.0</a> of developer tools for the Slack automations platform is here!</b> 🎉️ `, |
| 80 | + // }, |
| 81 | + }), |
184 | 82 | }; |
185 | 83 |
|
186 | 84 | export default config; |
0 commit comments