Skip to content

Add copy-pastable interactive code blocks for tutorials #206

Backlog

Description

@ccf-factory

Part 2 of 4 of #204: one pull request, stacked on #205.

Scope

Carries the epic's requirement "I'd like to support rich mdx formats to render them, supporting copy-pastable blocks the user can see and interact with". Builds the copy-pastable block: a CopyBlock for copyable text/config snippets and a CodeGroup that shows several code files as tabs (each copyable), on top of Docusaurus's built-in code-block copy button, styled with the site's Tailwind setup for light and dark themes (prism github/dracula). Registers them for MDX pages via markdown.mdxPageImports in docusaurus.config.ts so tutorial pages use them without per-page imports. Uses https://docs.mintlify.io as inspiration. No other components and no tutorial content.

Acceptance criteria

  • A .mdx page can render a CopyBlock and a CodeGroup with no per-page import.
  • Each block shows its content and a working copy button that puts the exact text on the clipboard.
  • CodeGroup switches between its files via tabs and keeps the copy button per file.
  • Blocks render correctly in light and dark mode.
  • yarn build, yarn typecheck and yarn spellcheck pass.

Files likely touched

  • src/components/tutorials/CodeBlock.tsx
  • src/components/tutorials/CodeGroup.tsx
  • docusaurus.config.ts
  • src/css/custom.css

Depends on

Activity

  1. added
    documentation
    on Nov 27, 2026
  2. ccf-factory commented on Nov 27, 2026

    @ccf-factory
    ContributorAuthor

    🏭 Tracked by CCF Factory — view

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions