Skip to content

feat: add C language icon for code blocks#4960

Closed
shanliuling wants to merge 2 commits intoshuding:mainfrom
shanliuling:feat/add-c-language-icon
Closed

feat: add C language icon for code blocks#4960
shanliuling wants to merge 2 commits intoshuding:mainfrom
shanliuling:feat/add-c-language-icon

Conversation

@shanliuling
Copy link
Copy Markdown

What is the problem?

The code block header was missing a C language icon, even though there was already a C++ icon available.

How did I fix it?

Added support for the C language icon by:

  1. Created c.svg icon file in packages/nextra/src/client/icons/
  2. Exported CIcon in packages/nextra/src/client/icons/index.ts
  3. Added case 'c' to the getIcon function in packages/nextra/src/client/hocs/with-icons.tsx

How was this tested?

  • Verified the SVG icon renders correctly
  • Checked that the code follows the same pattern as other language icons (CPP, Csharp, etc.)

Fixes #4685

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2026

@shanliuling is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextra-v2 Ready Ready Preview, Comment Mar 18, 2026 3:13am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 16, 2026

🦋 Changeset detected

Latest commit: 7d1ef69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
nextra Patch
nextra-theme-blog Patch
nextra-theme-docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@akirchhofer306-ctrl
Copy link
Copy Markdown

akirchhofer306-ctrl commented Mar 18, 2026 via email

@shanliuling shanliuling closed this by deleting the head repository Apr 20, 2026
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.

There's no C language icon in the code block header.

2 participants