Skip to content

Commit f8492d4

Browse files
Docs: salesforce compliance adjustments (#1581)
1 parent 1d0fda6 commit f8492d4

File tree

7 files changed

+248
-251
lines changed

7 files changed

+248
-251
lines changed

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ docs/
2020
│ └── oslo.svg
2121
├── src/
2222
│ └── theme (only contains the 404 page)
23-
├── docusaurus.config.js (main config file. also where to set navbar/footer)
23+
├── docusaurus.config.js (main config file)
24+
├── footerConfig.js (footer. go to main repo to change)
25+
├── navbarConfig.js (navbar. go to main repo to change)
2426
└── sidebar.js (manually set where the content docs are in the sidebar.)
2527
```
2628

docs/docusaurus.config.js

Lines changed: 72 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,84 @@
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-
71
import { themes as prismThemes } from "prism-react-renderer";
2+
const footer = require("./footerConfig");
3+
const navbar = require("./navbarConfig");
84

95
/** @type {import('@docusaurus/types').Config} */
106
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",
1914

20-
onBrokenLinks: "warn",
21-
onBrokenAnchors: "warn",
22-
onBrokenMarkdownLinks: "warn",
15+
onBrokenLinks: "warn",
16+
onBrokenAnchors: "warn",
17+
onBrokenMarkdownLinks: "warn",
2318

24-
i18n: {
25-
defaultLocale: "en",
26-
locales: ["en"],
27-
},
19+
i18n: {
20+
defaultLocale: "en",
21+
locales: ["en"],
22+
},
2823

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+
],
5244

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+
],
6254

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+
}),
18482
};
18583

18684
export default config;

docs/footerConfig.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const footer = {
2+
links: [
3+
{
4+
items: [
5+
{
6+
html: `
7+
<div style="display: flex; gap: 20px; max-width: 50%">
8+
<a href="https://slack.com/terms-of-service/user">Terms of Service</a>
9+
<a href="https://slack.com/trust/privacy/privacy-policy">Privacy Information</a>
10+
</div>
11+
©2024 Slack Technologies, LLC, a Salesforce company. All rights reserved. Various trademarks held by their respective owners.
12+
`,
13+
},
14+
],
15+
},
16+
],
17+
};
18+
19+
module.exports = footer;

docs/navbarConfig.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
const navbar = {
2+
title: "Slack Developer Tools",
3+
logo: {
4+
src: "img/slack-logo.svg",
5+
},
6+
items: [
7+
{
8+
type: "dropdown",
9+
label: "Bolt",
10+
position: "left",
11+
items: [
12+
{
13+
label: "Java",
14+
to: "https://tools.slack.dev/java-slack-sdk/guides/bolt-basics",
15+
target: "_self",
16+
},
17+
{
18+
label: "JavaScript",
19+
to: "https://tools.slack.dev/bolt-js",
20+
target: "_self",
21+
},
22+
{
23+
label: "Python",
24+
to: "https://tools.slack.dev/bolt-python",
25+
target: "_self",
26+
},
27+
],
28+
},
29+
{
30+
type: "dropdown",
31+
label: "SDKs",
32+
position: "left",
33+
items: [
34+
{
35+
label: "Java Slack SDK",
36+
to: "https://tools.slack.dev/java-slack-sdk/",
37+
target: "_self",
38+
},
39+
{
40+
label: "Node Slack SDK",
41+
to: "https://tools.slack.dev/node-slack-sdk/",
42+
target: "_self",
43+
},
44+
{
45+
label: "Python Slack SDK",
46+
to: "https://tools.slack.dev/python-slack-sdk/",
47+
target: "_self",
48+
},
49+
{
50+
label: "Deno Slack SDK",
51+
to: "https://api.slack.com/automation/quickstart",
52+
target: "_self",
53+
},
54+
],
55+
},
56+
{
57+
type: "dropdown",
58+
label: "Community",
59+
position: "left",
60+
items: [
61+
{
62+
label: "Community tools",
63+
to: "https://tools.slack.dev/community-tools",
64+
target: "_self",
65+
},
66+
{
67+
label: "Slack Community",
68+
to: "https://slackcommunity.com/",
69+
target: "_self",
70+
},
71+
],
72+
},
73+
{
74+
to: "https://api.slack.com/docs",
75+
label: "API Docs",
76+
target: "_self",
77+
},
78+
{
79+
"aria-label": "GitHub Repository",
80+
className: "navbar-github-link",
81+
href: "https://github.com/slackapi",
82+
position: "right",
83+
target: "_self",
84+
},
85+
],
86+
};
87+
88+
module.exports = navbar;

0 commit comments

Comments
 (0)