Skip to content

Add dark mode support to docs#341

Open
atesgoral wants to merge 1 commit intomodelcontextprotocol:mainfrom
atesgoral:dark-mode
Open

Add dark mode support to docs#341
atesgoral wants to merge 1 commit intomodelcontextprotocol:mainfrom
atesgoral:dark-mode

Conversation

@atesgoral
Copy link
Copy Markdown
Contributor

@atesgoral atesgoral commented May 10, 2026

Summary

  • add switchable light and dark Just the Docs stylesheets
  • default docs theme to the user's system color scheme and persist manual preferences in localStorage
  • add header icon controls for theme cycling and GitHub

Icon Sources

  • GitHub icon: Simple Icons (github.svg)
  • Theme icons: Lucide (monitor, sun, moon)

Verification

  • BUNDLE_GEMFILE=/tmp/ruby-sdk-docs-bundle.gqtVn4/Gemfile bundle exec jekyll build --source docs --destination /tmp/ruby-sdk-docs-pr-build --config docs/_config.yml,/tmp/ruby-sdk-docs-local.yml --trace
  • verified served header controls, SVG assets, and compressed theme toggle behavior locally

System

image

Light

image

Dark

image

Responsive

image

@atesgoral atesgoral marked this pull request as draft May 10, 2026 15:01
@atesgoral atesgoral marked this pull request as ready for review May 10, 2026 15:10
@@ -0,0 +1,117 @@
<script>
(function() {
var storageKey = "mcp-ruby-sdk-docs-theme";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Throughout the PR, I noticed the use of var. Is there a particular reason for not using const (or let for loop variables)?

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