From 0c2caccc7cb42978c752d65d1f039d989bd0591d Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Wed, 20 Jul 2022 16:00:10 +0300 Subject: [PATCH] docs: Add setup guide for slack connection --- packages/docs/docs/connections/slack.md | 94 ++++--------------------- 1 file changed, 12 insertions(+), 82 deletions(-) diff --git a/packages/docs/docs/connections/slack.md b/packages/docs/docs/connections/slack.md index 1730c61e..008f699a 100644 --- a/packages/docs/docs/connections/slack.md +++ b/packages/docs/docs/connections/slack.md @@ -4,85 +4,15 @@ sidebar_position: 3 # Slack -Let's translate `docs/intro.md` to French. - -## Configure i18n - -Modify `docusaurus.config.js` to add support for the `fr` locale: - -```js title="docusaurus.config.js" -module.exports = { - i18n: { - defaultLocale: 'en', - locales: ['en', 'fr'], - }, -}; -``` - -## Translate a doc - -Copy the `docs/intro.md` file to the `i18n/fr` folder: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/ - -cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md -``` - -Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French. - -## Start your localized site - -Start your site on the French locale: - -```bash -npm run start -- --locale fr -``` - -Your localized site is accessible at `http://localhost:3000/fr/` and the `Getting Started` page is translated. - -:::caution - -In development, you can only use one locale at a same time. - -::: - -## Add a Locale Dropdown - -To navigate seamlessly across languages, add a locale dropdown. - -Modify the `docusaurus.config.js` file: - -```js title="docusaurus.config.js" -module.exports = { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'localeDropdown', - }, - // highlight-end - ], - }, - }, -}; -``` - -The locale dropdown now appears in your navbar: - -![Locale Dropdown](/img/tutorial/localeDropdown.png) - -## Build your localized site - -Build your site for a specific locale: - -```bash -npm run build -- --locale fr -``` - -Or build your site to include all the locales at once: - -```bash -npm run build -``` +1. Go to the [link](https://api.slack.com/apps?new_app=1) to **create an app** on Slack API. +2. Select **From scratch**. +3. Enter **App name**. +4. Pick the workspace you would like to use with the Slack connection. +5. Click on **Create App** button. +6. Click the **Permissions** card on the **Add features and functionality** section. +7. Go to **Bot Token Scopes** and add the necessary scopes. ([more info](https://api.slack.com/scopes?filter=granular_bot)) +8. Go to **OAuth Tokens for Your Workspace** and click **Install to Workspace**. +9. In **Where should Sample post?** section, select the channel you would like to use with Automatisch, and click **Allow**. +10. Copy **Bot User OAuth Token** and paste it to **Access Token** on the Automatisch page. +11. Click **Submit** button on Automatisch. +12. Now, you can start using the Slack connection with Automatisch.