Skip to content

Docs: creates markdown reference - #1565

Open
lukegalbraithrussell wants to merge 16 commits into
mainfrom
md-reference
Open

Docs: creates markdown reference#1565
lukegalbraithrussell wants to merge 16 commits into
mainfrom
md-reference

Conversation

@lukegalbraithrussell

Copy link
Copy Markdown
Contributor

Summary

This PR replaces the html reference with a md-based on. Tighter integration with docusaurus, and allows easier agent access as the md files are accessible. Also will now be trackable in Google Analaytics

Testing

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

lukegalbraithrussell and others added 16 commits August 13, 2026 10:38
Wrap inline code examples in docstrings with ```python fences so the
Markdown API reference renders them as highlighted code blocks instead of
flat prose. Changes are docstring-only; no code behavior is affected.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…down)

Replace the pdoc3 HTML generator with pydoc-markdown so the API reference
is emitted as Markdown for docs.slack.dev/Docusaurus.

- Rewrite generate_api_docs.sh to drive the new Markdown pipeline.
- Add generate_api_docs.py, which:
  - inlines re-exported classes/functions so adapter pages show their
    handler inline (matching pdoc3's behavior);
  - adds OrderedGoogleProcessor to keep fenced code blocks in their
    original position (the stock GoogleProcessor relocates a code block
    that precedes a section keyword to after the prose);
  - replaces pydoc-markdown's escape_except_blockquotes, which corrupts
    docstrings with >10 code spans by duplicating a code block into later
    spans (BLOCKQUOTE_TOKEN prefix collision).
- Regenerate docs/reference as Markdown (removes the old HTML tree).
- Point the sidebar "Reference" link at the new Markdown path.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Rename each generated package __init__.md to index.md and rewrite the
generated sidebar.json edges to match. The docusaurus renderer emits a
package's docs as <pkg>/__init__.md, whose route is .../<pkg>/__init__ --
nothing resolves at the bare .../<pkg>/ URL that the sidebar's Reference
link (.../reference/slack_bolt/) targets. Docusaurus serves index.md at
the folder URL, so this makes that link resolve instead of 404.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
The App.start() docstring had an indented (unfenced) code example whose
'#' comment lines rendered as Markdown H1 headers in the Markdown output.
Wrap it in a ```python fence. This propagates to all 24 pages that inline
App via re-export.

Also point the generator at docs/english/reference (the reference tree's
location) instead of docs/reference.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
The docs site imports docs/english/_sidebar.json and filters it; it does
not read the generated reference/sidebar.json. Replace the external
"Reference" link with the generated category tree, prefixing doc IDs with
tools/bolt-python/ so they resolve against the docs root.

The generator now does this automatically (_sync_reference_sidebar) so the
sidebar stays in sync on every regeneration.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@lukegalbraithrussell
lukegalbraithrussell requested review from a team as code owners August 19, 2026 17:57
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.65%. Comparing base (a70d247) to head (0669cbd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
+ Coverage   91.54%   91.65%   +0.11%     
==========================================
  Files         228      228              
  Lines        7285     7383      +98     
==========================================
+ Hits         6669     6767      +98     
  Misses        616      616              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@WilliamBergamin WilliamBergamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this 💯

Left some comments/questions before we can move forward with this 🙏

@@ -0,0 +1,756 @@
#!/usr/bin/env python

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of custom code 😅 any chance we can rely on defaults or configs instead of having this?

@@ -26,35 +26,61 @@
class AsyncOAuthSettings:
# OAuth flow parameters/credentials
client_id: str
"""Check the value in Settings > Basic Information > App Credentials"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see these pydoc comments showing up in the generated markdown 🤔 if they are not there then I think we should not add them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants