removed some out-of-scope sections

This commit is contained in:
m455 2022-12-06 00:07:43 -05:00
parent 42d1fab665
commit 57f8535875

View file

@ -29,38 +29,12 @@ no one is liable if this software breaks, deletes, corrupts, or ruins anything
- git
**note**: if you have chicken scheme installed, then you can install the eggs
above by running `sudo make dependencies`.
## quickstart
on your server, run the following commands, changing anything occurs between angled brackets ("<" and ">"):
adduser git
mkdir /var/www/git
chown git:git /var/www/git
cp git-daemon.service /etc/systemd/system/
ufw allow 9418
systemctl enable --now git-daemon.service
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
add your public ssh key to .ssh/authorized_keys
mkdir projects
clone this repository
cd into this repository
sudo make dependencies
make
sudo make install
edit the post-receive file
cp post-receive <path/to/bare/git/repository>/hooks/
chmod u+x <path/to/bare/git/repository>/hooks/post-receive
then in a git repository on your local machine, run git remote add origin git@<example.com>:~/projects/<repository-name>
git push
above by running `make dependencies` as root.
## compilation
chicken scheme runs faster if it's compiled to a binary file. by default, the
binary is named `repo2html`, and is added to `/usr/local/bin`.
binary is named `repo2html`, and is installed in `/usr/local/bin`.
to compile repo2html into a binary file, follow the steps below:
@ -69,21 +43,11 @@ to compile repo2html into a binary file, follow the steps below:
3. run `make`
4. run `make install` as root
## server setup
TODO (git user, ssh, ufw ports, web directory, git-daemon, mkdir /home/git/projects, post-receive hook, systemd service)
## usage
after you've set up your server and set your remote git url on your local
machine, you can use `git push` to push updates to your projects, and the
`post-receive` hook will generate an html version of your git repository.
## configuration
you can configure repo2html by changing environment variables in the `post-receive` hook file.
refer to the list of environment variable names and their descriptions to learn more:
for details about the environment variables, refer to the list below:
- `GIT_WWW`: the web directory where repo2html generates static git repositories. for example, `/var/www/git/`.
- `GIT_WWW_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.
@ -91,6 +55,10 @@ refer to the list of environment variable names and their descriptions to learn
- `GIT_WWW_DESCRIPTION`: a string that populates the `description` meta information about your git repository.
- `GIT_WWW_H1`: the text that populates the `<h1>` html tag.
## how it works
TODO
## todos
- ☐ 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