https://github.com/michaelliao/git-explorer
File explorer for a subdir of repo which can embedded to web page.
https://github.com/michaelliao/git-explorer
embedded explorer git html-component
Last synced: 7 months ago
JSON representation
File explorer for a subdir of repo which can embedded to web page.
- Host: GitHub
- URL: https://github.com/michaelliao/git-explorer
- Owner: michaelliao
- License: gpl-3.0
- Created: 2023-04-06T08:40:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-21T23:52:53.000Z (11 months ago)
- Last Synced: 2025-03-22T15:49:49.275Z (8 months ago)
- Topics: embedded, explorer, git, html-component
- Language: JavaScript
- Homepage: https://michaelliao.github.io/git-explorer/
- Size: 1.47 MB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Explorer
Git Explorer can convert any Github-compatible URL into a file explorer that can be embedded into a web page.
For example, the link:
[https://github.com/michaelliao/git-explorer/tree/main/sample](https://github.com/michaelliao/git-explorer/tree/main/sample)
can be converted to:

See live demo on [https://michaelliao.github.io/git-explorer/](https://michaelliao.github.io/git-explorer/).
# Usage
```
createGitExplorer(
document.querySelector('#placeholder'), // DOM to replace
'https://github.com/michaelliao/git-explorer/tree/main/sample' // GitHub-compatible URL
);
```
### How to change style
Override [git-explorer.css](https://github.com/michaelliao/git-explorer/blob/main/css/git-explorer.css) in your own CSS.
# Notes
The URL must contain branch info so the following URL is not work:
```
https://github.com/michaelliao/git-explorer
```
Use URL with branch instead:
```
https://github.com/michaelliao/git-explorer/tree/main
```