wiki/HowtoGitit.md

87 lines
1.5 KiB
Markdown
Raw Normal View History

2017-01-20 10:48:10 +01:00
---
categories: git
title: Howto GitIt
---
2017-01-20 11:41:45 +01:00
* Dépôt officiel : <https://github.com/jgm/gitit/tree/master/>
## Installation
### Paquet Debian (version 0.10)
2017-01-20 10:48:10 +01:00
~~~
# apt install gitit
~~~
### Manuellement
2017-01-20 10:48:10 +01:00
~~~
# apt install cabal-install ghc zlib1g-dev
# adduser gitit
# sudo -ui gitit
~~~
~~~
$ cabal update
$ cabal install gitit
$ echo PATH="$HOME/.cabal/bin:$PATH" > ~/.profile
~~~
2017-01-20 10:48:10 +01:00
Note : `/tmp` doit être en EXEC pendant l'installation
## Configuration
2017-01-20 10:48:10 +01:00
~~~
$ gitit --print-default-config > gitit.conf
~~~
2017-01-20 10:48:10 +01:00
`gitit.conf` :
2016-09-16 00:08:15 +02:00
~~~
address: 127.0.0.1
repository-type: Git
repository-path: git
session-timeout: 36000
default-extension: md
default-page-type: Markdown
front-page: index
no-delete: index, Help
use-cache: yes
~~~
2017-01-20 10:48:10 +01:00
`/etc/nginx/sites-available/gitit.conf` :
2016-09-16 00:08:15 +02:00
~~~
server {
server_name gitit.example.com;
listen 0.0.0.0:80;
listen [::]:80;
location /_register {
allow 192.0.2.42;
deny all;
proxy_pass http://127.0.0.1:5001/_register;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
2016-09-16 00:08:15 +02:00
location / {
proxy_pass http://127.0.0.1:5001/;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
access_log /var/log/nginx/gitit/access.log;
error_log /var/log/nginx/gitit/error.log;
}
~~~
## Lancement
2017-01-20 10:48:10 +01:00
~~~
$ gitit -f gitit.conf
~~~
2016-09-16 00:08:15 +02:00
Pour voir la liste des langages supportés pour le highlighting :
2017-01-20 10:48:10 +01:00
~~~
$ pandoc -v
~~~