Skip to content

f2h2h1/git-explorer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

can be converted to:

gitexplorer.png

See live demo on https://michaelliao.github.io/git-explorer/.

Usage

<html>
<head>
    <link rel="stylesheet" href="https://michaelliao.github.io/git-explorer/css/git-explorer.css">
    <script src="https://michaelliao.github.io/git-explorer/js/git-explorer.js"></script>
</head>
<body>
    <div id="placeholder"></div>
    <script>
        createGitExplorer(
            document.querySelector('#placeholder'), // DOM to replace
            'https://github.com/michaelliao/git-explorer/tree/main/sample' // GitHub-compatible URL
        );
    </script>
</body>
</html>

How to change style

Override 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

About

File explorer for a subdir of repo which can embedded to web page.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.2%
  • CSS 34.7%
  • HTML 13.1%