Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: adds Docusaurus site #1113

Merged
merged 23 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5064ff1
docs:removing old framework
lukegalbraithrussell Jul 25, 2024
f92e690
docs:setting up docs files
lukegalbraithrussell Jul 25, 2024
ef39476
docs: now buildable
lukegalbraithrussell Jul 25, 2024
55e98c0
docs: adding temporary reference
lukegalbraithrussell Jul 26, 2024
fb6ac04
docs: remove temporary duplicated reference
lukegalbraithrussell Jul 26, 2024
ce7abbf
docs: renamed nested docs folder to content
lukegalbraithrussell Jul 26, 2024
45aabb5
docs: feedback from other pr
lukegalbraithrussell Jul 30, 2024
7ceb1fd
docs: broken link
lukegalbraithrussell Jul 30, 2024
624fe6c
docs: move reference folders over
lukegalbraithrussell Jul 30, 2024
55a5f16
docs: matching bolt-js
lukegalbraithrussell Jul 30, 2024
8080056
docs: package-lock refresh
lukegalbraithrussell Jul 30, 2024
7089a23
docs: change reference gen path
lukegalbraithrussell Jul 30, 2024
a64c7a8
Apply suggestions from eden
lukegalbraithrussell Jul 31, 2024
d642ba6
docs - feadback from zim
lukegalbraithrussell Jul 31, 2024
2e93c2b
docs - feedback from william regarding scripts
lukegalbraithrussell Jul 31, 2024
3ff3cc6
Update scripts/generate_api_docs.sh
lukegalbraithrussell Jul 31, 2024
cf451be
Update .github/maintainers_guide.md
lukegalbraithrussell Jul 31, 2024
528901b
docs - update path to reference
lukegalbraithrussell Jul 31, 2024
c5b1e2c
translated tutorials sidebar
lukegalbraithrussell Jul 31, 2024
c36b9be
docs - same redirect set up as bolt-js
lukegalbraithrussell Aug 1, 2024
7e10773
docs: remove dupe content
lukegalbraithrussell Aug 1, 2024
1f16536
Merge branch 'main' into luke-docs-overhaul
lukegalbraithrussell Aug 2, 2024
1353ce4
docs: matching bolt-js
lukegalbraithrussell Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/docs"
schedule:
interval: "monthly"
6 changes: 5 additions & 1 deletion .github/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ If you want to test the package locally you can.

### Releasing

#### Generate API documents
#### Generate API reference documents

```bash
./scripts/generate_api_docs.sh
Expand Down Expand Up @@ -230,6 +230,10 @@ with labels. An issue should have **one** of the following labels applied: `bug`
Issues are closed when a resolution has been reached. If for any reason a closed issue seems relevant once again,
reopening is great and better than creating a duplicate issue.

## Managing Documentation

See the [`/docs/README.md`](../docs/README.md) file for documentation instructions.

## Everything else

When in doubt, find the other maintainers and ask.
62 changes: 62 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to GitHub Pages

on:
lukegalbraithrussell marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches:
- main
paths:
- 'docs/**'
push:
branches:
- main
paths:
- 'docs/**'
workflow_dispatch:

lukegalbraithrussell marked this conversation as resolved.
Show resolved Hide resolved
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: ./docs

- name: Build website
run: npm run build
working-directory: ./docs

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build
lukegalbraithrussell marked this conversation as resolved.
Show resolved Hide resolved

deploy:
name: Deploy to GitHub Pages
lukegalbraithrussell marked this conversation as resolved.
Show resolved Hide resolved
if: github.event_name != 'pull_request'
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # verifies deployment is from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<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>
<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>

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

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/).
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/).

## Setup

Expand Down Expand Up @@ -137,10 +137,10 @@ Most of the app's functionality will be inside listener functions (the `fn` para
| `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`).
| `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**. |
| `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.
| `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).
| `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).
| `respond` | Utility function that responds to incoming events **if** it contains a `response_url` (shortcuts, actions, and slash commands).
| `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).
| `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.
| `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.
| `logger` | The built-in [`logging.Logger`](https://docs.python.org/3/library/logging.html) instance you can use in middleware/listeners.

## Creating an async app
Expand Down
11 changes: 3 additions & 8 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
_site
Gemfile.lock
.env
.jekyll-metadata
.vscode/
.bundle/
vendor/
.ruby-version
node_modules/
.docusaurus
build
198 changes: 0 additions & 198 deletions docs/.markdownlint.yml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/Gemfile

This file was deleted.

Loading