Skip to content

Replace Torchlight with native Rouge syntax highlighting - #568

Open
andrewmcodes with Copilot wants to merge 11 commits into
mainfrom
copilot/explore-dropping-torchlight-dependency
Open

Replace Torchlight with native Rouge syntax highlighting#568
andrewmcodes with Copilot wants to merge 11 commits into
mainfrom
copilot/explore-dropping-torchlight-dependency

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR removes the Torchlight API dependency and migrates syntax highlighting to Bridgetown’s built-in Rouge pipeline. The goal is to keep code rendering quality while eliminating token/config/CI coupling to an external highlighter.

  • Highlighting pipeline migration

    • Switched bridgetown.config.yml from highlighter: "" to highlighter: rouge.
    • Removed Torchlight runtime integration (plugins/builders/torchlight.rb, torchlight.config.cjs).
    • Removed post-level Torchlight opt-in (src/_posts/_defaults.yml).
  • Code block styling parity on Rouge output

    • Replaced pre.torchlight/fallback styling with Rouge-aware selectors:
      • .highlighter-rouge .highlight pre.highlight
      • pre:not(.highlight) fallback
    • Added token-level Rouge class styling (.k, .s*, .c*, .na/.nf/.nc, .gd/.gi) using existing design tokens.
  • Dependency and secret surface cleanup

    • Removed @torchlight-api/torchlight-cli from package.json and lockfile.
    • Removed TORCHLIGHT_TOKEN usage from CI workflows and fnox.toml.
    • Removed .torchlight-cache/ ignore entry.
  • Documentation and operational updates

    • Updated README, AGENTS, design-system docs, runbooks, and mise.toml comments to reflect Rouge-first behavior and remove Torchlight/token rotation references.
    • Updated OG builder comments that referenced Torchlight ordering.
# bridgetown.config.yml
highlighter: rouge

Copilot AI and others added 2 commits July 17, 2026 23:30
Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>
Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>
@andrewmcodes

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved and merged origin/main into this PR branch, fixing the conflicts in README.md, docs/design-system.md, and docs/runbooks.md in commit f416efa.

@andrewmcodes
andrewmcodes marked this pull request as ready for review July 17, 2026 23:43
@github-actions

Copy link
Copy Markdown
Contributor

@andrewmcodes

Copy link
Copy Markdown
Owner

@copilot your syntax highlighting theme should be similar to OneDark Pro instead of this custom bullshit you did. I need WAY more colors in my syntax highlighting.

Copilot AI and others added 2 commits July 17, 2026 23:53
Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>
Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot your syntax highlighting theme should be similar to OneDark Pro instead of this custom bullshit you did. I need WAY more colors in my syntax highlighting.

Updated in 81c0284 with a OneDark Pro-like Rouge theme and expanded token coverage so syntax highlighting uses many more distinct colors.

@andrewmcodes

Copy link
Copy Markdown
Owner

@copilot the new theme is way better, but can we tweak it just slightly to better fit in with the website theme?

Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>

Copilot AI commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the new theme is way better, but can we tweak it just slightly to better fit in with the website theme?

Done in 7aab311 with a subtle palette tune so the OneDark-like Rouge theme blends better with the site (mint/sage-aligned accents and slightly adjusted base code block tones).

@andrewmcodes andrewmcodes left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the torchlight cache files should be added so keep the gitignore entry

Copilot AI requested a review from andrewmcodes July 24, 2026 06:19
@andrewmcodes

Copy link
Copy Markdown
Owner

@copilot there are torchlight-cache/* files in the diff that shouldn't be.

Co-authored-by: andrewmcodes <18423853+andrewmcodes@users.noreply.github.com>

Copilot AI commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot there are torchlight-cache/* files in the diff that shouldn't be.

Fixed in 9fdd2b1: removed tracked .torchlight-cache/* files from the branch and restored .torchlight-cache/ in .gitignore.

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.

2 participants