
Ask HN: Tool(s) to render Git repository as static website - mvdwoord
So this is hard to google, as almost everything points to hosting static websites on GitHub etc..<p>I am looking for a tool that can generate a static website from a git repository. E.g. generate a set of html files with some markup so I can present the contents of a git repository similar to the way GitHub&#x2F;GitLab but as a static website for self-hosting. Nice to have all branches etc in there, but would already be nice to just have a single branch..<p>The goal would be to have a stand alone &#x2F; static site for archival &#x2F; offline use &#x2F; inclusion in other static site (self-hosted). Being able to browse the code and download a zip file would be minimum. Viewing commits and perhaps generated diffs between certain commits would be a bonus.<p>Only thing I could find was stuff that converts just the wiki part of a GitHub repo. I am really looking for something that takes a .git repo and spits out some static website. Perhaps as a plugin for Jekyll&#x2F;Hugo &#x2F; ?? but stand alone would be just as good. Thx.
======
williamdclt
Git comes with a `git instaweb` command, that allows to visualize a repo.
Which seems... completely broken.

The web server does launch at localhost:1234, but accessing this URL shows a
HTTP 500 error on my two machines, whatever the repo (even on the git repo
itself).

~~~
mvdwoord
Haha, That is awesome! Seems the git learning curve never ends. Alas, it is a
cgi file which dynamically generates the pages over lighttpd. Good to know
though!!

------
vaibhavsagar
Somebody posted
[Stagit]([https://git.codemadness.org/stagit/](https://git.codemadness.org/stagit/))
to HN a while ago, which seems to fit your description.

~~~
mvdwoord
Perfect!! Thanks, I will check it out.

------
mvdwoord
Finally found a magic word that gets me somewhere in the search engines...
git2html.
[Hypercubed/git2html]([https://github.com/Hypercubed/git2html](https://github.com/Hypercubed/git2html))
is the first hit. reading as we speak. Any alternatives / experience greatly
appreciated though.

Can't find anything else really, and most discussions are years old. Anyone?

~~~
billconan
you can try doxygen. It generates class list and file list.

