repo2html/README.md

91 lines
3.3 KiB
Markdown
Raw Normal View History

2022-12-02 16:41:55 -05:00
# repo2html
2022-12-07 15:54:03 -05:00
a command-line tool that turns git repositories in html pages
2022-12-02 16:41:55 -05:00
## features
- static html files
2022-12-07 15:51:16 -05:00
- image support (we're working on this)
- svg support (we're working on this)
- markdown files are rendered as html (we're working on this)
2022-12-07 15:54:03 -05:00
- no background process (unless you're using this tool as a post-receive hook, then you only need git-daemon running)
- default repository view is an html-rendered README.md file
2022-12-02 16:41:55 -05:00
## caveats
- binary file contents are just... shown
- directory tree is shown as a flat list of files, so git repositories with
many files and directories will look awful
- no commit log (yet?)
- no line numbers (yet?)
2022-12-02 16:41:55 -05:00
## disclaimer
no one is liable if this software breaks, deletes, corrupts, or ruins anything
2022-12-02 16:41:55 -05:00
## requirements
2022-12-02 16:54:38 -05:00
- [chicken scheme](https://call-cc.org/)
- [utf8 egg](https://wiki.call-cc.org/eggref/5/utf8)
- [lowdown egg](https://wiki.call-cc.org/eggref/5/lowdown)
- [sxml-transforms egg](https://wiki.call-cc.org/eggref/5/sxml-transforms)
- [clojurian egg](https://wiki.call-cc.org/eggref/5/clojurian)
- git
2022-12-02 16:54:38 -05:00
**note**: if you have chicken scheme installed, then you can install the eggs
2022-12-06 00:07:43 -05:00
above by running `make dependencies` as root.
2022-12-02 16:41:55 -05:00
## compilation
chicken scheme runs faster if it's compiled to a binary file. by default, the
2022-12-06 00:07:43 -05:00
binary is named `repo2html`, and is installed in `/usr/local/bin`.
to compile repo2html into a binary file, follow the steps below:
1. ensure you're in the repo2html git repository
2. run `make dependencies` as root
3. run `make`
4. run `make install` as root
2022-12-02 16:41:55 -05:00
## installation
TODO
## using repo2html as a post-receive hook
TODO
## using repo2html as a standalone command-line utility
TODO
2022-12-02 16:41:55 -05:00
## configuration
you can configure repo2html by changing environment variables in the `post-receive` hook file.
2022-12-06 00:07:43 -05:00
for details about the environment variables, refer to the list below:
- `REPO2HTML_PREFIX`: the web directory where repo2html generates static git repositories. for example, `/var/www/git/`.
- `REPO2HTML_CLONE_URL`: the url that people will use when downloading your git repository. if you have git-daemon set up, then you can prefix the url with `git://`. otherwise, prefix the url with `http://`. for example, `git://git.example.com`. **note**: avoid slashes at the end of the url.
- `REPO2HTML_TITLE`: the text that populates the `<title>` html tag.
- `REPO2HTML_DESCRIPTION`: a string that populates the `description` meta information about your git repository.
- `REPO2HTML_H1`: the text that populates the `<h1>` html tag.
2022-12-02 16:41:55 -05:00
2022-12-06 00:07:43 -05:00
## how it works
TODO
2022-12-02 16:41:55 -05:00
## todos
- update docs according to changes in `50bbb3686d37fc00c95aedde82bc7a58de53b410`. m455 updated things a bit, but he wants to touch up on way more things documentation-wise according to the changes in this commit.
- e2e tutorial
- if no README.md file exists in the root directory of the repository, then don't create the "about" nav link. instead, make the files page the index.html
- add a "license" nav link if a LICENSE file exists in the root directory of the repository. if no LICENSE file exists, then don't create the "license" nav link
- add a "contributors" nav link
2022-12-02 16:41:55 -05:00
## hopes
- clickable line numbers in source files
- make repos with more files and directories less daunting (recursively generate a files list page for each directory in a repo?)
- nav link: Releases