From 02857edd18d69b3f08c201cf2e2278f3875c8f39 Mon Sep 17 00:00:00 2001 From: Thomas Decaux Date: Mon, 29 Jun 2026 18:23:10 +0200 Subject: [PATCH 01/15] docs: design spec for configurable GitlabReadme TOC placement Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Decaux --- ...6-29-gitlab-readme-toc-placement-design.md | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 docs/superpowers/specs/2026-06-29-gitlab-readme-toc-placement-design.md diff --git a/docs/superpowers/specs/2026-06-29-gitlab-readme-toc-placement-design.md b/docs/superpowers/specs/2026-06-29-gitlab-readme-toc-placement-design.md new file mode 100644 index 0000000..902d00d --- /dev/null +++ b/docs/superpowers/specs/2026-06-29-gitlab-readme-toc-placement-design.md @@ -0,0 +1,171 @@ +# Design: configurable TOC placement for `` + +## Summary + +Add a `toc` attribute to `` that controls where the README's table +of contents renders: + +- **hide** the TOC, +- show it **inline** (today's behavior), or +- show it in the **right page sidebar**, like a normal Docusaurus page. + +All work happens at build time in the existing remark pipeline. The rendered +README HTML and the pure React component are unchanged; the sidebar is populated +by augmenting the page's native `toc` export that Docusaurus already generates. + +## Background + +Today an inline TOC appears only when the README contains the GitLab `[[_TOC_]]` +marker. `renderMarkdown` → `rehypeGitlabToc` ([src/gitlab/toc.ts](../../../src/gitlab/toc.ts)) +replaces that marker with a `