An open API service indexing awesome lists of open source software.

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.

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:

![gitexplorer.png](gitexplorer.png)

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
```