Skip to content

Commit 5ef7023

Browse files
Docs: adds Docusaurus site (#1113)
1 parent 8f6f69d commit 5ef7023

File tree

305 files changed

+16332
-1794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+16332
-1794
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ updates:
1212
directory: "/"
1313
schedule:
1414
interval: "monthly"
15+
- package-ecosystem: "npm"
16+
directory: "/docs"
17+
schedule:
18+
interval: "monthly"

.github/maintainers_guide.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ If you want to test the package locally you can.
111111

112112
### Releasing
113113

114-
#### Generate API documents
114+
#### Generate API reference documents
115115

116116
```bash
117117
./scripts/generate_api_docs.sh
@@ -230,6 +230,10 @@ with labels. An issue should have **one** of the following labels applied: `bug`
230230
Issues are closed when a resolution has been reached. If for any reason a closed issue seems relevant once again,
231231
reopening is great and better than creating a duplicate issue.
232232
233+
## Managing Documentation
234+
235+
See the [`/docs/README.md`](../docs/README.md) file for documentation instructions.
236+
233237
## Everything else
234238
235239
When in doubt, find the other maintainers and ask.

.github/workflows/docs-deploy.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'docs/**'
14+
workflow_dispatch:
15+
16+
jobs:
17+
build:
18+
name: Build Docusaurus
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: npm
28+
cache-dependency-path: docs/package-lock.json
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
working-directory: ./docs
33+
34+
- name: Build website
35+
run: npm run build
36+
working-directory: ./docs
37+
38+
- name: Upload Build Artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: ./docs/build
42+
43+
deploy:
44+
name: Deploy to GitHub Pages
45+
if: github.event_name != 'pull_request'
46+
needs: build
47+
48+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
49+
permissions:
50+
pages: write # to deploy to Pages
51+
id-token: write # verifies deployment is from an appropriate source
52+
53+
# Deploy to the github-pages environment
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1 align="center">Bolt <img src="https://raw.githubusercontent.com/slackapi/bolt-python/main/docs/assets/bolt-logo.svg" alt="Bolt logo"/> for Python</h1>
1+
<h1 align="center">Bolt <img src="https://raw.githubusercontent.com/slackapi/bolt-python/main/docs/static/img/bolt-logo.svg" alt="Bolt logo" width="32"/> for Python</h1>
22

33
<p align="center">
44
<a href="https://pypi.org/project/slack-bolt/">
@@ -14,7 +14,7 @@
1414
<img alt="Documentation" src="https://img.shields.io/badge/dev-docs-yellow"></a>
1515
</p>
1616

17-
A Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://slack.dev/bolt-python/tutorial/getting-started) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt. The Python module documents are available [here](https://slack.dev/bolt-python/api-docs/slack_bolt/).
17+
A Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://slack.dev/bolt-python/getting-started) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt. The Python module documents are available [here](https://slack.dev/bolt-python/api-docs/slack_bolt/).
1818

1919
## Setup
2020

@@ -137,10 +137,10 @@ Most of the app's functionality will be inside listener functions (the `fn` para
137137
| `body` | Dictionary that contains the entire body of the request (superset of `payload`). Some accessory data is only available outside of the payload (such as `trigger_id` and `authorizations`).
138138
| `payload` | Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https://api.slack.com/events-api#event_type_structure). For a block action, it will be the action from within the `actions` list. The `payload` dictionary is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangably. **An easy way to understand what's in a payload is to log it**. |
139139
| `context` | Event context. This dictionary contains data about the event and app, such as the `botId`. Middleware can add additional context before the event is passed to listeners.
140-
| `ack` | Function that **must** be called to acknowledge that your app received the incoming event. `ack` exists for all actions, shortcuts, view submissions, slash command and options requests. `ack` returns a promise that resolves when complete. Read more in [Acknowledging events](https://slack.dev/bolt-python/concepts#acknowledge).
140+
| `ack` | Function that **must** be called to acknowledge that your app received the incoming event. `ack` exists for all actions, shortcuts, view submissions, slash command and options requests. `ack` returns a promise that resolves when complete. Read more in [Acknowledging events](https://slack.dev/bolt-python/concepts/acknowledge).
141141
| `respond` | Utility function that responds to incoming events **if** it contains a `response_url` (shortcuts, actions, and slash commands).
142142
| `say` | Utility function to send a message to the channel associated with the incoming event. This argument is only available when the listener is triggered for events that contain a `channel_id` (the most common being `message` events). `say` accepts simple strings (for plain-text messages) and dictionaries (for messages containing blocks).
143-
| `client` | Web API client that uses the token associated with the event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by using [the OAuth library](https://slack.dev/bolt-python/concepts#authenticating-oauth), or manually using the `authorize` function.
143+
| `client` | Web API client that uses the token associated with the event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by using [the OAuth library](https://slack.dev/bolt-python/concepts/authenticating-oauth), or manually using the `authorize` function.
144144
| `logger` | The built-in [`logging.Logger`](https://docs.python.org/3/library/logging.html) instance you can use in middleware/listeners.
145145

146146
## Creating an async app

docs/.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
_site
2-
Gemfile.lock
3-
.env
4-
.jekyll-metadata
5-
.vscode/
6-
.bundle/
7-
vendor/
8-
.ruby-version
1+
node_modules/
2+
.docusaurus
3+
build

docs/.markdownlint.yml

Lines changed: 0 additions & 198 deletions
This file was deleted.

docs/Gemfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)