diff --git a/docs/README.md b/docs/README.md index 22a279f0..c1f79adf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,7 +30,9 @@ website/ ├── src/ │ ├── pages/ (stuff that isn't docs. This is empty for this repo!) │ └── theme/ (only contains the 404 page) -├── docusaurus.config.js (main config file. also where to set navbar/footer) +├── docusaurus.config.js (main config file) +├── footerConfig.js (footer. go to main repo to change) +├── navbarConfig.js (navbar. go to main repo to change) └── sidebar.js (manually set where the docs are in the sidebar.) ``` diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 51b9e06c..d6c3aa5a 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,17 +1,12 @@ -// @ts-check -// `@type` JSDoc annotations allow editor autocompletion and type checking -// (when paired with `@ts-check`). -// There are various equivalent ways to declare your Docusaurus config. -// See: https://docusaurus.io/docs/api/docusaurus-config - -import { themes as prismThemes } from "prism-react-renderer"; +import { themes as prismThemes } from 'prism-react-renderer'; +const footer = require('./footerConfig'); +const navbar = require('./navbarConfig'); /** @type {import('@docusaurus/types').Config} */ const config = { title: "Bolt for Python", tagline: "Official frameworks, libraries, and SDKs for Slack developers", favicon: "img/favicon.ico", - url: "https://tools.slack.dev", baseUrl: "/bolt-python/", organizationName: "slackapi", @@ -42,9 +37,6 @@ const config = { theme: { customCss: "./src/css/custom.css", }, - gtag: { - trackingID: 'G-9H1YZW28BG', - }, }), ], ], @@ -79,102 +71,8 @@ const config = { autoCollapseCategories: true, }, }, - navbar: { - title: "Slack Developer Tools", - logo: { - alt: "Slack logo", - src: "img/slack-logo.svg", - href: "https://tools.slack.dev", - target: "_self", - }, - items: [ - { - type: "dropdown", - label: "Bolt", - position: "left", - items: [ - { - label: "Java", - to: "https://tools.slack.dev/java-slack-sdk/guides/bolt-basics", - target: "_self", - }, - { - label: "JavaScript", - to: "https://tools.slack.dev/bolt-js", - target: "_self", - }, - { - label: "Python", - to: "https://tools.slack.dev/bolt-python", - target: "_self", - }, - ], - }, - { - type: "dropdown", - label: "SDKs", - position: "left", - items: [ - { - label: "Java Slack SDK", - to: "https://tools.slack.dev/java-slack-sdk/", - target: "_self", - }, - { - label: "Node Slack SDK", - to: "https://tools.slack.dev/node-slack-sdk/", - target: "_self", - }, - { - label: "Python Slack SDK", - to: "https://tools.slack.dev/python-slack-sdk/", - target: "_self", - }, - { - label: "Deno Slack SDK", - to: "https://api.slack.com/automation/quickstart", - target: "_self", - }, - ], - }, - { - type: "dropdown", - label: "Community", - position: "left", - items: [ - { - label: "Community tools", - to: "https://tools.slack.dev/community-tools", - target: "_self", - }, - { - label: "Slack Community", - to: "https://slackcommunity.com/", - target: "_self", - }, - ], - }, - { - to: "https://api.slack.com/docs", - label: "API Docs", - target: "_self", - }, - { - type: "localeDropdown", - position: "right", - }, - { - "aria-label": "GitHub Repository", - className: "navbar-github-link", - href: "https://github.com/slackapi/bolt-python", - position: "right", - target: "_self", - }, - ], - }, - footer: { - copyright: `

Made with ♡ by Slack and pals like you

`, - }, + navbar, + footer, prism: { // switch to alucard when available in prism? theme: prismThemes.github, diff --git a/docs/footerConfig.js b/docs/footerConfig.js new file mode 100644 index 00000000..e3e10c57 --- /dev/null +++ b/docs/footerConfig.js @@ -0,0 +1,19 @@ +const footer = { + links: [ + { + items: [ + { + html: ` +

+ Terms of Service + Privacy Information +
+ ©2024 Slack Technologies, LLC, a Salesforce company. All rights reserved. Various trademarks held by their respective owners. + `, + }, + ], + }, + ], +}; + +module.exports = footer; diff --git a/docs/navbarConfig.js b/docs/navbarConfig.js new file mode 100644 index 00000000..f4277367 --- /dev/null +++ b/docs/navbarConfig.js @@ -0,0 +1,88 @@ +const navbar = { + title: 'Slack Developer Tools', + logo: { + src: 'img/slack-logo.svg', + }, + items: [ + { + type: 'dropdown', + label: 'Bolt', + position: 'left', + items: [ + { + label: 'Java', + to: 'https://tools.slack.dev/java-slack-sdk/guides/bolt-basics', + target: '_self', + }, + { + label: 'JavaScript', + to: 'https://tools.slack.dev/bolt-js', + target: '_self', + }, + { + label: 'Python', + to: 'https://tools.slack.dev/bolt-python', + target: '_self', + }, + ], + }, + { + type: 'dropdown', + label: 'SDKs', + position: 'left', + items: [ + { + label: 'Java Slack SDK', + to: 'https://tools.slack.dev/java-slack-sdk/', + target: '_self', + }, + { + label: 'Node Slack SDK', + to: 'https://tools.slack.dev/node-slack-sdk/', + target: '_self', + }, + { + label: 'Python Slack SDK', + to: 'https://tools.slack.dev/python-slack-sdk/', + target: '_self', + }, + { + label: 'Deno Slack SDK', + to: 'https://api.slack.com/automation/quickstart', + target: '_self', + }, + ], + }, + { + type: 'dropdown', + label: 'Community', + position: 'left', + items: [ + { + label: 'Community tools', + to: 'https://tools.slack.dev/community-tools', + target: '_self', + }, + { + label: 'Slack Community', + to: 'https://slackcommunity.com/', + target: '_self', + }, + ], + }, + { + to: 'https://api.slack.com/docs', + label: 'API Docs', + target: '_self', + }, + { + 'aria-label': 'GitHub Repository', + className: 'navbar-github-link', + href: 'https://github.com/slackapi', + position: 'right', + target: '_self', + }, + ], +}; + +module.exports = navbar;