Skip to content

Hide GitHub-only message on docs site#157

Merged
laveeshb merged 1 commit intomainfrom
hide-github-only-message
Mar 29, 2026
Merged

Hide GitHub-only message on docs site#157
laveeshb merged 1 commit intomainfrom
hide-github-only-message

Conversation

@laveeshb
Copy link
Copy Markdown
Owner

@laveeshb laveeshb commented Jan 12, 2026

Summary

Hide the "Browsing on GitHub?" message when viewing on kernel-internals.org, while keeping it visible on GitHub.

Approach:

  • Wrap the message in <div class="github-only" markdown>
  • Add CSS rule .github-only { display: none; } to extra.css
  • GitHub ignores the CSS, so the message shows there
  • The docs site applies the CSS, hiding it

Wrap the "Browsing on GitHub?" message in a div with class
github-only, and add CSS to hide it on kernel-internals.org.

This way the message only appears when viewing the README on
GitHub, where users benefit from the site-index.md link.
@laveeshb laveeshb merged commit bb88e46 into main Mar 29, 2026
@laveeshb laveeshb deleted the hide-github-only-message branch March 29, 2026 23:19
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