Add readme
README.md unknown status 1
1 | + | Gitile | |
2 | + | ====== | |
3 | + | ||
4 | + | Gitile (pronounced /*gitil*/) is a small git forge written in | |
5 | + | [Guile Scheme](https://gnu.org/software/guile). It can currently show public | |
6 | + | repository contents on a website. Visit [https://git.lepiller.eu/gitile](this | |
7 | + | project's repository) to have a look at what it can do. | |
8 | + | ||
9 | + | How to Build Gitile | |
10 | + | ------------------- | |
11 | + | ||
12 | + | Gitile requires Guile of course, in addition to the following Guile libraries: | |
13 | + | ||
14 | + | * guile-git (for accessing git repositories) | |
15 | + | * guile-connmark (for markdown highlighting) | |
16 | + | * guile-syntax-highlight (for other syntax highlighting. Use commit | |
17 | + | `51727cbb7fc05ef743aab2d7b16314ea1ed790e4`, it is more recent than the | |
18 | + | latest release) | |
19 | + | * guile-fibers (for running a multithreaded web server) | |
20 | + | * guile-gcrypt (for a hash computation) | |
21 | + | ||
22 | + | You will also need the usual suspects: | |
23 | + | ||
24 | + | * autotools | |
25 | + | * make | |
26 | + | * pkg-config | |
27 | + | ||
28 | + | From this repository, run the following: | |
29 | + | ||
30 | + | ```bash | |
31 | + | ./bootstrap | |
32 | + | ./configure | |
33 | + | make | |
34 | + | ``` | |
35 | + | ||
36 | + | To install run: | |
37 | + | ||
38 | + | ```bash | |
39 | + | make install | |
40 | + | ``` | |
41 | + | ||
42 | + | How to Run Gitile? | |
43 | + | ------------------ | |
44 | + | ||
45 | + | Before running gitile, you will need a configuration file. The configuration | |
46 | + | is a record that contains all of the following keys, as in the following | |
47 | + | example: | |
48 | + | ||
49 | + | ```scheme | |
50 | + | ;; gitile.conf | |
51 | + | (config | |
52 | + | (port 8080) | |
53 | + | (host "localhost") | |
54 | + | (database "") | |
55 | + | (repositories "/srv/git") | |
56 | + | (base-git-url "https://git.example.org/git") | |
57 | + | (index-title "My projects") | |
58 | + | (intro ((p "Content of the intro on index page"))) | |
59 | + | (footer ((p "Footer content"))))) | |
60 | + | ``` | |
61 | + | ||
62 | + | * port: the port on which to listen | |
63 | + | * host: the host on which to listen | |
64 | + | * database: currently unused | |
65 | + | * repositories: The directory in which public repositories can be found | |
66 | + | * base-git-url: The base url for cloning repositories | |
67 | + | * index-title: The title for the index page | |
68 | + | * intro: The content of the introduction text on the index page. It is a list | |
69 | + | of sxml expressions. | |
70 | + | * footer: The content of the footer text on all pages. It is also a list of | |
71 | + | sxml expressions. | |
72 | + | ||
73 | + | Save the file as `gitile.conf` (or whatever name you like) and run gitile with | |
74 | + | ||
75 | + | ```bash | |
76 | + | ./pre-inst-env scripts/gitile -c gitile.conf | |
77 | + | ``` | |
78 | + | ||
79 | + | It should be running on `localhost:8080`, but you will not get any assets. | |
80 | + | ||
81 | + | To get assets, you need to have them served, for instance with Nginx acting as | |
82 | + | a reverse proxy for gitile, and serving the assets directly. | |
83 | + | ||
84 | + | Repository Configuration | |
85 | + | ------------------------ | |
86 | + | ||
87 | + | In order to show information such as a description, a nice name, and a short | |
88 | + | summary for each repository, you need to configure it in the repository, with | |
89 | + | `git config`. We use the `gitweb.*` configuration space for that. | |
90 | + | ||
91 | + | * gitweb.description: The long description shown on the index page, it can | |
92 | + | contain arbitrary html tags. | |
93 | + | * gitweb.synopsis: The short summary shown on the project page. | |
94 | + | * gitweb.name: The nice name shown on the index page. | |
95 | + | ||
96 | + | For instance, you can set the following on a repository: | |
97 | + | ||
98 | + | ```bash | |
99 | + | cd /srv/git/my-repo | |
100 | + | git config --local gitweb.description "My repository is a wonderful project that will <b>conquer</b> the world!" | |
101 | + | git config --local gitweb.synopsis "A repo to conquer the world" | |
102 | + | git config --local gitweb.name "My Repository" | |
103 | + | ``` |