Skip to content

Add code block syntax highlighting#40

Merged
bigtiger merged 7 commits intomainfrom
jrr/code-block-formatting
Mar 29, 2026
Merged

Add code block syntax highlighting#40
bigtiger merged 7 commits intomainfrom
jrr/code-block-formatting

Conversation

@bigtiger
Copy link
Copy Markdown
Contributor

Adds styled, syntax-highlighted code blocks to the theme using Prism.js.

Changes

  • Styles inline code code.css and fenced blocks. Using token colors from the existing design.
  • Yellow Language Label in the top-right corner showing the language name.
  • Place an HTML card with before a code block to enable line wrapping instead of horizontal scroll.
  • Prism.js: Loaded from jsDelivr CDN with autoloader.

Authoring

In the Ghost editor, insert a Code card (via the + menu) and select a language. To enable line wrapping on a specific block, insert an HTML card with directly before it.

@bigtiger bigtiger merged commit 8dfa258 into main Mar 29, 2026
1 check passed
@bigtiger bigtiger deleted the jrr/code-block-formatting branch March 29, 2026 17:55
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