Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
01015a2
docs: add Markdown code fences to docstrings
lukegalbraithrussell Aug 13, 2026
67812bc
docs: migrate API reference from HTML (pdoc3) to Markdown (pydoc-mark…
lukegalbraithrussell Aug 13, 2026
2266bf2
docs: serve package reference pages at folder URLs
lukegalbraithrussell Aug 13, 2026
23874b0
move to be within english
lukegalbraithrussell Aug 13, 2026
de6d47e
docs: fence App.start() example and target docs/english/reference
lukegalbraithrussell Aug 13, 2026
51128e2
docs: embed reference tree into _sidebar.json
lukegalbraithrussell Aug 13, 2026
c6960fc
go
lukegalbraithrussell Aug 14, 2026
2b95612
go
lukegalbraithrussell Aug 14, 2026
44bafeb
colliding paths fix
lukegalbraithrussell Aug 14, 2026
da71715
go
lukegalbraithrussell Aug 14, 2026
7bf50da
go
lukegalbraithrussell Aug 14, 2026
ab7e690
go
lukegalbraithrussell Aug 14, 2026
24fe29c
go
lukegalbraithrussell Aug 14, 2026
07ba452
toc
lukegalbraithrussell Aug 18, 2026
abe7dd9
docstrings
lukegalbraithrussell Aug 18, 2026
0669cbd
toggles
lukegalbraithrussell Aug 18, 2026
490dbde
griffe
lukegalbraithrussell Aug 20, 2026
ccfe23e
working
lukegalbraithrussell Aug 20, 2026
3b07a17
streamline
lukegalbraithrussell Aug 20, 2026
0e8f943
go
lukegalbraithrussell Aug 20, 2026
608fc38
cleanup
lukegalbraithrussell Aug 20, 2026
f8c6b89
fencing
lukegalbraithrussell Aug 20, 2026
9cdcc00
gen reference sidebar
lukegalbraithrussell Aug 25, 2026
6353313
go
lukegalbraithrussell Aug 26, 2026
eef36ac
Merge main: adopt Ruff + docstring formatting from #1566/#1567
lukegalbraithrussell Aug 28, 2026
4ff3e0f
Md reference griffe (#1569)
lukegalbraithrussell Sep 1, 2026
ff4a9f2
Merge branch 'main' into md-reference
lukegalbraithrussell Sep 3, 2026
fae307f
consolidate and tests
lukegalbraithrussell Sep 4, 2026
d910487
ci idea
lukegalbraithrussell Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: serve package reference pages at folder URLs
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>
  • Loading branch information
lukegalbraithrussell and Claude committed Aug 13, 2026
commit 2266bf27f12f7b79b887957a75990589fa1d1e1d
132 changes: 66 additions & 66 deletions docs/reference/sidebar.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions scripts/generate_api_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import copy
import html
import json
import os
import re

Expand Down Expand Up @@ -247,6 +248,47 @@ def main():
inline_reexports(modules)
session.process(modules)
session.render(modules)
_rename_package_indexes()


def _rename_package_indexes():
"""Rename each package's ``__init__.md`` to ``index.md`` and rewrite the
generated ``sidebar.json`` to match.

The docusaurus renderer writes a package's docs to ``<pkg>/__init__.md``,
whose Docusaurus route is ``.../<pkg>/__init__`` -- there is no document at
the bare ``.../<pkg>/`` URL. Docusaurus serves ``index.md`` at the folder
URL, so renaming makes ``.../reference/slack_bolt/`` resolve (the path the
sidebar's Reference link points at) instead of 404ing.
"""
reference_dir = os.path.join(REPO_ROOT, "docs", "reference")
renamed = 0
for dirpath, _dirnames, filenames in os.walk(reference_dir):
if "__init__.md" in filenames:
os.replace(
os.path.join(dirpath, "__init__.md"),
os.path.join(dirpath, "index.md"),
)
renamed += 1

sidebar_path = os.path.join(reference_dir, "sidebar.json")
with open(sidebar_path, encoding="utf-8") as handle:
sidebar = json.load(handle)

def rewrite(node):
if isinstance(node, str):
return node[: -len("__init__")] + "index" if node.endswith("/__init__") else node
if isinstance(node, list):
return [rewrite(item) for item in node]
if isinstance(node, dict):
return {key: rewrite(value) for key, value in node.items()}
return node

with open(sidebar_path, "w", encoding="utf-8") as handle:
json.dump(rewrite(sidebar), handle, indent=2)
handle.write("\n")

print("Renamed {} package __init__.md files to index.md".format(renamed))


if __name__ == "__main__":
Expand Down