Commit 17eac04
feat(web): syntax highlighting for blog MDX + SDK showcase (SQLR-44) (#121)
* feat(web): syntax highlighting for blog MDX (SQLR-44)
Wire rehype-pretty-code + Shiki into the MDXRemote pipeline in
web/src/components/blog-mdx.tsx and map Shiki's --shiki-token-* CSS
variables onto the blog's existing palette tokens in globals.css so
themes stay coherent. Inline code keeps its chip styling
(bypassInlineCode) and unlanguaged fences fall back to plaintext.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(web): syntax highlighting for SDK showcase on landing
Pre-render the six SDK snippets with shiki at build time and ship the
resulting HTML to the existing client-side tab switcher. The shiki
theme (createCssVariablesTheme) and helper move to a shared
src/lib/highlight.ts so the blog MDX and the landing page reuse the
same --shiki-token-* → palette mapping. The .code-body rule in
globals.css declares the same shiki var mapping the blog does.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2d15aef commit 17eac04
8 files changed
Lines changed: 649 additions & 92 deletions
File tree
- web
- src
- app
- components
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
149 | 173 | | |
150 | 174 | | |
151 | 175 | | |
| |||
0 commit comments