Skip to content

fix(docs): prevent code block overflow on installation page - #27

Open
sloweyyy wants to merge 1 commit into
k8sgpt-ai:mainfrom
sloweyyy:fix/docs-code-block-overflow
Open

fix(docs): prevent code block overflow on installation page#27
sloweyyy wants to merge 1 commit into
k8sgpt-ai:mainfrom
sloweyyy:fix/docs-code-block-overflow

Conversation

@sloweyyy

@sloweyyy sloweyyy commented Jun 1, 2026

Copy link
Copy Markdown

Problem

The installation page (/docs/getting-started/installation) had a horizontal overflow issue: long install URLs and commands pushed the page wider than the viewport.

The root cause is that the page relies on prose-pre/prose-code Tailwind classes from @tailwindcss/typography, but that plugin is not installed (plugins: [] in tailwind.config.js). As a result, code blocks rendered completely unstyled with no horizontal scrolling, so long lines expanded the page.

Fix

Added explicit pre/code renderers to the ReactMarkdown instance in Installation.tsx, using the same light code-block style already used across the rest of the docs (e.g. the CLI reference page): bg-gray-100 p-4 rounded-lg overflow-x-auto.

Long lines now scroll inside the code block instead of expanding the page.

Before
image

After
image

Verification

  • Desktop (1280px) and mobile (375px): page no longer overflows horizontally.
  • Long content scrolls inside the code block as expected.
  • Code blocks now match the styling of the CLI reference page for visual consistency.

@netlify

netlify Bot commented Jun 1, 2026

Copy link
Copy Markdown

Deploy Preview for helpful-alpaca-646002 ready!

Name Link
🔨 Latest commit 00bb582
🔍 Latest deploy log https://app.netlify.com/projects/helpful-alpaca-646002/deploys/6a1d2d20936ff90009394d9d
😎 Deploy Preview https://deploy-preview-27--helpful-alpaca-646002.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 1, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: sloweyyy / name: Truong Le Vinh Phuc (4255a7b)

@sloweyyy
sloweyyy force-pushed the fix/docs-code-block-overflow branch from b2c0dbd to 4255a7b Compare June 1, 2026 06:50
The installation page relied on `prose-pre`/`prose-code` Tailwind classes,
but the `@tailwindcss/typography` plugin is not installed, so code blocks
rendered unstyled with no horizontal scrolling. Long install URLs pushed the
page wider than the viewport, causing horizontal overflow.

Add explicit `pre`/`code` renderers to ReactMarkdown using the same light
code-block style as the rest of the docs (CLI reference): `bg-gray-100 p-4
rounded-lg overflow-x-auto`. Long lines now scroll inside the code block
instead of expanding the page.

Signed-off-by: Truong Le Vinh Phuc <37492460+sloweyyy@users.noreply.github.com>
@sloweyyy
sloweyyy force-pushed the fix/docs-code-block-overflow branch from 4255a7b to 00bb582 Compare June 1, 2026 06:56
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.

1 participant