Github Code Viewer
unlistedby henzoparahua
Minimalist code viewer linking github repos to your notes.
★ 1 starsUpdated 1mo ago0BSD
GitHub Code Viewer for Obsidian
Minimalist code viewer linking GitHub repos to your notes :p
Usage
To use the plugin, simply create a code block with the github language tag and paste the URL of the file you want to display.
Supported URL Formats
- Full File:
https://github.com/owner/repo/blob/main/path/to/file.ts - Specific Lines:
https://github.com/owner/repo/blob/main/path/to/file.ts#L10-L20

Settings
If you want to display code from private repositories, you need to provide a GitHub Personal Access Token:
- Go to Obsidian Settings > Community Plugins > GitHub Code Viewer.
- Paste your GitHub Personal Access Token (PAT).
- The token is securely saved locally on your computer.
Manual Installation
- Go to the Releases page of this repository.
- Download the
main.js,manifest.json, andstyles.cssfiles from the latest release. - Inside your Obsidian vault, navigate to
.obsidian/plugins/and create a folder namedgithub-code-viewer. - Place the downloaded files inside the newly created folder.
- Restart Obsidian, go to Settings > Community Plugins, disable "Safe Mode", and enable GitHub Code Viewer.
Development
To build this plugin locally:
- Clone this repository.
- Make sure your NodeJS is at least v16.
- Run
npm installto install dependencies. - Run
npm run devto start compilation in watch mode. - Run
npm run buildfor a production build.
Support
If you find this plugin helpful, consider supporting me!
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.