Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 573 lines (414 sloc) 20.226 kb
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
1 Gitit
2 =====
89725fd John MacFarlane Initial commit.
authored
3
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
4 Gitit is a wiki program written in Haskell. It uses [Happstack][] for
5 the web server and [pandoc][] for markup processing. Pages and uploaded
6 files are stored in a [git][], [darcs][], or [mercurial][] repository
7 and may be modified either by using the VCS's command-line tools or
8 through the wiki's web interface. By default, pandoc's extended version
9 of markdown is used as a markup language, but reStructuredText, LaTeX,
10 or HTML can also be used. Pages can be exported in a number of different
0f4f9c6 John MacFarlane Indicate in README that LaTeX or HTML formats can be used.
authored
11 formats, including LaTeX, RTF, OpenOffice ODT, and MediaWiki markup.
ff6f3b9 John MacFarlane Updated math part of README.
authored
12 Gitit can be configured to display TeX math (using [texmath][]) and
0f4f9c6 John MacFarlane Indicate in README that LaTeX or HTML formats can be used.
authored
13 highlighted source code (using [highlighting-kate][]).
89725fd John MacFarlane Initial commit.
authored
14
0d14feb John MacFarlane Added links to demo site in documentation and gitit.cabal.
authored
15 Other features include
16
17 * plugins: dynamically loaded page transformations written in Haskell
18 (see "Network.Gitit.Interface")
19
20 * categories
21
22 * TeX math
23
24 * syntax highlighting of source code files and code snippets (using
25 highlighting-kate)
26
27 * caching
28
29 * Atom feeds (site-wide and per-page)
30
31 * a library, "Network.Gitit", that makes it simple to include a gitit
32 wiki in any happstack application
33
34 You can see a running demo at <http://gitit.johnmacfarlane.net>.
35
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
36 [git]: http://git.or.cz
d9c8cd8 John MacFarlane Modified description slightly, mentioning darcs as well as git.
authored
37 [darcs]: http://darcs.net
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
38 [mercurial]: http://mercurial.selenic.com/
89725fd John MacFarlane Initial commit.
authored
39 [pandoc]: http://johnmacfarlane.net/pandoc
fd9eed5 John MacFarlane Changed mentions of HAppS to Happstack.
authored
40 [Happstack]: http://happstack.com
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
41 [highlighting-kate]: http://johnmacfarlane.net/highlighting-kate/
ff6f3b9 John MacFarlane Updated math part of README.
authored
42 [texmath]: http://github.com/jgm/texmath/tree/master
89725fd John MacFarlane Initial commit.
authored
43
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
44 Getting started
45 ===============
89725fd John MacFarlane Initial commit.
authored
46
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
47 Compiling and installing gitit
48 ------------------------------
89725fd John MacFarlane Initial commit.
authored
49
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
50 You'll need the [GHC][] compiler and the [cabal-install][] tool. GHC can
98adca8 John MacFarlane Note the GHC 6.10 requirement in README.
authored
51 be downloaded [here][]. Note that, starting with release 0.5, GHC 6.10
52 or higher is required. For [cabal-install][] on *nix, follow the [quick
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
53 install][] instructions.
89725fd John MacFarlane Initial commit.
authored
54
55 [GHC]: http://www.haskell.org/ghc/
56 [here]: http://www.haskell.org/ghc/
57 [cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
58 [quick install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall#Quick Installation on Unix
59
97e0043 Improved README.
John MacFarlane authored
60 Once you've got cabal-install, installing gitit is trivial:
89725fd John MacFarlane Initial commit.
authored
61
a7c11fe John MacFarlane Simplified installation instructions.
authored
62 cabal update
89725fd John MacFarlane Initial commit.
authored
63 cabal install gitit
64
a7c11fe John MacFarlane Simplified installation instructions.
authored
65 These commands will install the latest released version of gitit.
89725fd John MacFarlane Initial commit.
authored
66 To install a version of gitit checked out from the repository,
67 change to the gitit directory and type:
68
69 cabal install
70
71 The `cabal` tool will automatically install all of the required haskell
72 libraries. If all goes well, by the end of this process, the latest
73 release of gitit will be installed in your local `.cabal` directory. You
74 can check this by trying:
75
76 gitit --version
77
78 If that doesn't work, check to see that `gitit` is in your local
79 cabal-install executable directory (usually `~/.cabal/bin`). And make
80 sure `~/.cabal/bin` is in your system path.
81
97e0043 Improved README.
John MacFarlane authored
82 Optional syntax highlighting support
83 ------------------------------------
84
85 If pandoc was compiled with optional syntax highlighting support,
86 this will be available in gitit too. This feature is recommended
87 if you plan to display source code on your wiki.
88
89 Highlighting support requires the [pcre][] library, so make sure that
90 is installed before continuing.
91
92 [pcre]: http://www.pcre.org/
93
94 To install gitit with highlighting support, first ensure that pandoc
95 is compiled with highlighting support, then install gitit as above:
96
97 cabal install pandoc -fhighlighting --reinstall
98 cabal install gitit
99
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
100 Running gitit
101 -------------
89725fd John MacFarlane Initial commit.
authored
102
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
103 To run gitit, you'll need `git` in your system path. (Or `darcs` or
104 `hg`, if you're using darcs or mercurial to store the wiki data.)
89725fd John MacFarlane Initial commit.
authored
105
97e0043 Improved README.
John MacFarlane authored
106 Gitit assumes that the page files (stored in the git repository) are
107 encoded as UTF-8. Even page names may be UTF-8 if the file system
108 supports this. So you should make sure that you are using a UTF-8 locale
109 when running gitit. (To check this, type `locale`.)
73db5a1 John MacFarlane Noted need for UTF-8 locale in README.
authored
110
f8ab67e John MacFarlane Reformatting (line lengths) of README.
authored
111 Switch to the directory where you want to run gitit. This should be a
f1f023a John MacFarlane Use nested templates in templates/ directory rather than template.html.
authored
112 directory where you have write access, since three directories, `static`,
113 `templates`, and `wikidata`, and two files, `gitit-users` and `gitit.log`,
114 will be created here. To start gitit, just type:
89725fd John MacFarlane Initial commit.
authored
115
116 gitit
117
118 If all goes well, gitit will do the following:
119
120 1. Create a git repository, `wikidata`, and add a default front page.
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
121 2. Create a `static` directory containing files to be treated as
122 static files by gitit.
f1f023a John MacFarlane Use nested templates in templates/ directory rather than template.html.
authored
123 3. Create a `templates` directory containing HStringTemplate templates
f498fc6 John MacFarlane Use HStringTemplate template for pages.
authored
124 for wiki pages.
125 4. Start a web server on port 5001.
89725fd John MacFarlane Initial commit.
authored
126
f8ab67e John MacFarlane Reformatting (line lengths) of README.
authored
127 Check that it worked: open a web browser and go to
128 <http://localhost:5001>.
97e0043 Improved README.
John MacFarlane authored
129
bf28dcb README: added note about -p and -h options.
John MacFarlane authored
130 You can control the port that gitit runs on using the `-p` option:
6064190 John MacFarlane Fixed markdown error in README.
authored
131 `gitit -p 4000` will start gitit on port 4000. Additional runtime
bf28dcb README: added note about -p and -h options.
John MacFarlane authored
132 options are described by `gitit -h`.
133
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
134 Using gitit
135 ===========
136
97e0043 Improved README.
John MacFarlane authored
137 Wiki links and formatting
138 -------------------------
139
140 For instructions on editing pages and creating links, see the "Help" page.
141
f8ab67e John MacFarlane Reformatting (line lengths) of README.
authored
142 Gitit interprets links with empty URLs as wikilinks. Thus, in markdown
143 pages, `[Front Page]()` creates an internal wikilink to the page `Front
144 Page`. In reStructuredText pages, `` `Front Page <>`_ `` has the same
145 effect.
89725fd John MacFarlane Initial commit.
authored
146
c332b94 John MacFarlane Documentation changes for new index link format.
authored
147 If you want to link to a directory listing for a subdirectory, use a
148 trailing slash: `[foo/bar/]()` creates a link to the directory for
149 `foo/bar`.
150
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
151 Page metadata
152 -------------
153
154 Pages may optionally begin with a metadata block. Here is an example:
155
38209d9 John MacFarlane Updated README with new metadata format.
authored
156 ---
157 format: latex+lhs
158 categories: haskell math
159 toc: no
160 title: Haskell and
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
161 Category Theory
38209d9 John MacFarlane Updated README with new metadata format.
authored
162 ...
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
163
164 \section{Why Category Theory?}
165
d89590a John MacFarlane Don't require blank line after metadata block.
authored
166 The metadata block consists of a list of key-value pairs, each on a
167 separate line. If needed, the value can be continued on one or more
168 additional line, which must begin with a space. (This is illustrated by
169 the "title" example above.) The metadata block must begin with a line
170 `---` and end with a line `...` optionally followed by one or more blank
171 lines. (The metadata block is a valid YAML document, though not all YAML
172 documents will be valid metadata blocks.)
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
173
174 Currently the following keys are supported:
175
176 format
177 : Overrides the default page type as specified in the configuration file.
178 Possible values are `markdown`, `rst`, `latex`, `html`, `markdown+lhs`,
179 `rst+lhs`, `latex+lhs`. (Capitalization is ignored, so you can also
180 use `LaTeX`, `HTML`, etc.) The `+lhs` variants indicate that the page
181 is to be interpreted as literate Haskell. If this field is missing,
182 the default page type will be used.
183
184 categories
185 : A space or comma separated list of categories to which the page belongs.
186
187 toc
188 : Overrides default setting for table-of-contents in the configuration file.
189 Values can be `yes`, `no`, `true`, or `false` (capitalization is ignored).
190
191 title
192 : By default the displayed page title is the page name. This metadata element
193 overrides that default.
194
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
195 Highlighted source code
196 -----------------------
197
198 If gitit was compiled against a version of pandoc that has highlighting
199 support (see above), you can get highlighted source code by using
200 [delimited code blocks][]:
201
202 ~~~ {.haskell .numberLines}
203 qsort [] = []
204 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
205 qsort (filter (>= x) xs)
206 ~~~
207
4ff0a58 John MacFarlane Small documentation improvement suggested by joee.
authored
208 To see what languages your pandoc was compiled to highlight:
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
209
210 pandoc -v
211
212 [delimited code blocks]: http://johnmacfarlane.net/pandoc/README.html#delimited-code-blocks
213
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
214 Configuring and customizing gitit
215 =================================
488e6bb README: Added instructions for proxying with apache.
John MacFarlane authored
216
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
217 Configuration options
218 ---------------------
89725fd John MacFarlane Initial commit.
authored
219
fe77c93 README: Clarified use of -f option.
John MacFarlane authored
220 Use the option `-f [filename]` to specify a configuration file:
ce07825 John MacFarlane Added data/default.conf, which defines default config file values.
authored
221
fe77c93 README: Clarified use of -f option.
John MacFarlane authored
222 gitit -f my.conf
223
224 If this option is not used, gitit will use a default configuration.
225 To get a copy of the default configuration file, which you
226 can customize, just type:
227
228 gitit --print-default-config > my.conf
ce07825 John MacFarlane Added data/default.conf, which defines default config file values.
authored
229
230 The default configuration file is documented with comments throughout.
2859d1b John MacFarlane Document --print-default-config.
authored
231
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
232 The `static` directory
233 ----------------------
89725fd John MacFarlane Initial commit.
authored
234
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
235 On receiving a request, gitit always looks first in the `static`
236 directory (or in whatever directory is specified for `static-dir` in
237 the configuration file). If a file corresponding to the request is
238 found there, it is served immediately. If the file is not found in
239 `static`, gitit next looks in the `static` subdirectory of gitit's data
240 file (`$CABALDIR/share/gitit-x.y.z/data`). This is where default css,
241 images, and javascripts are stored. If the file is not found there
242 either, gitit treats the request as a request for a wiki page or wiki
243 command.
244
245 So, you can throw anything you want to be served statically (for
246 example, a `robots.txt` file or `favicon.ico`) in the `static`
247 directory. You can override any of gitit's default css, javascript, or
248 image files by putting a file with the same relative path in `static`.
2473f07 John MacFarlane Added robots.txt to static.
authored
249 Note that gitit has a default `robots.txt` file that excludes all
250 URLs beginning with `/_`.
89725fd John MacFarlane Initial commit.
authored
251
77d20a3 John MacFarlane README changes: running with darcs, updated some refs to config options...
authored
252 Note: if you set `static-dir` to be a subdirectory of `repository-path`,
89e0a04 John MacFarlane Added note about possibility of putting static inside repository.
authored
253 and then add the files in the static directory to your repository, you
254 can ensure that others who clone your wiki repository get these files
255 as well. It will not be possible to modify these files using the web
256 interface, but they will be modifiable via git.
257
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
258 Using a VCS other than git
77d20a3 John MacFarlane README changes: running with darcs, updated some refs to config options...
authored
259 --------------------------
260
261 By default, gitit will store wiki pages in a git repository in the
262 `wikidata` directory. If you'd prefer to use darcs instead of git,
263 you need to add the following field to the configuration file:
264
265 repository-type: Darcs
266
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
267 If you'd prefer to use mercurial, add:
268
269 repository-type: Mercurial
270
77d20a3 John MacFarlane README changes: running with darcs, updated some refs to config options...
authored
271 This program may be called "darcsit" instead of "gitit" when a darcs
272 backend is used.
273
99d1199 John MacFarlane Added comments on filestore/maxcount to darcs sec of README.
authored
274 Note: we recommend that you use gitit/darcsit with darcs version
275 2.3.0 or greater. If you must use an older version of darcs, then
276 you need to compile the filestore library without the (default)
277 maxcount flag, before (re)installing gitit:
278
279 cabal install --reinstall filestore -f-maxcount
280 cabal install --reinstall gitit
281
282 Otherwise you will get an error when you attempt to access your
283 repository.
284
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
285 Changing the theme
286 ------------------
89725fd John MacFarlane Initial commit.
authored
287
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
288 To change the look of the wiki, you can modify `custom.css` in
289 `static/css`.
97e0043 Improved README.
John MacFarlane authored
290
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
291 To change the look of printed pages, copy gitit's default `print.css`
292 to `static/css` and modify it.
97e0043 Improved README.
John MacFarlane authored
293
f498fc6 John MacFarlane Use HStringTemplate template for pages.
authored
294 The logo picture can be changed by copying a new PNG file to
97e0043 Improved README.
John MacFarlane authored
295 `static/img/logo.png`.
296
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
297 To change the footer, modify `templates/footer.st`.
298
299 For more radical changes, you can override any of the default
aeeb91e Templates are in data directory
Chris Eidhof authored
300 templates in `$CABALDIR/share/gitit-x.y.z/data/templates` by copying
d77f566 John MacFarlane Updated README.markdown for changes to static and templates.
authored
301 the file into `templates` and modifying it. The `page.st` template is
302 the master template; it includes the others. Interpolated variables are
303 surrounded by `$`s, so `literal $` must be backslash-escaped.
89725fd John MacFarlane Initial commit.
authored
304
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
305 Adding support for math
306 -----------------------
89725fd John MacFarlane Initial commit.
authored
307
7fa7383 John MacFarlane Updated README with information about metadata block.
authored
308 To write math on a markdown-formatted wiki page, just enclose it
309 in dollar signs, as in LaTeX:
89725fd John MacFarlane Initial commit.
authored
310
311 Here is a formula: $\frac{1}{\sqrt{c^2}}$
312
313 You can write display math by enclosing it in double dollar signs:
314
315 $$\frac{1}{\sqrt{c^2}}$$
316
ff6f3b9 John MacFarlane Updated math part of README.
authored
317 Gitit can display TeX math in three different ways, depending on the
318 setting of `math` in the configuration file:
319
320 1. `mathml` (default): Math will be converted to MathML using
321 [texmath][]. This method works with IE+mathplayer, Firefox, and
322 Opera, but not Safari.
323
324 2. `jsMath`: Math will be rendered using the [jsMath][] javascript.
325 If you want to use this method, download `jsMath` and `jsMath
326 Image Fonts` from the [jsMath download page][]. You'll have two
327 `.zip` archives. Unzip them both in the `static/js` directory (a new
328 subdirectory, `jsMath`, will be created). This works with all
329 browsers, but is slower and not as nice looking as MathML.
330
331 3. `raw`: Math will be rendered as raw LaTeX codes.
332
89725fd John MacFarlane Initial commit.
authored
333 [jsMath download page]: http://sourceforge.net/project/showfiles.php?group_id=172663
334
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
335 Plugins
336 =======
89725fd John MacFarlane Initial commit.
authored
337
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
338 Plugins are small Haskell programs that transform a wiki page after it
339 has been converted from Markdown or RST. See the example plugins in the
340 `plugins` directory. To enable a plugin, include the path to the plugin
341 (or its module name) in the `plugins` field of the configuration file.
342 (If the plugin name starts with `Network.Gitit.Plugin.`, gitit will assume that
343 the plugin is an installed module and will not look for a source file.)
89725fd John MacFarlane Initial commit.
authored
344
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
345 Plugin support is enabled by default. However, plugin support makes
346 the gitit executable considerably larger and more memory-hungry.
347 If you don't need plugins, you may want to compile gitit without plugin
348 support. To do this, unset the `plugins` Cabal flag:
89725fd John MacFarlane Initial commit.
authored
349
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
350 cabal install --reinstall gitit -f-plugins
89725fd John MacFarlane Initial commit.
authored
351
e9ac5c2 John MacFarlane Make plugins flag enabled by default.
authored
352 Note also that if you compile gitit for executable profiling, attempts
353 to load plugins will result in "internal error: PAP object entered!"
89725fd John MacFarlane Initial commit.
authored
354
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
355 Accessing the wiki through git
356 ==============================
89725fd John MacFarlane Initial commit.
authored
357
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
358 All the pages and uploaded files are stored in a git repository. By
359 default, this lives in the `wikidata` directory (though this can be
360 changed through configuration options). So you can interact with the
361 wiki using git command line tools:
89725fd John MacFarlane Initial commit.
authored
362
363 git clone ssh://my.server.edu/path/of/wiki/wikidata
364 cd wikidata
365 vim Front\ Page.page # edit the page
366 git commit -m "Added message about wiki etiquette" Front\ Page.page
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
367 git push
89725fd John MacFarlane Initial commit.
authored
368
369 If you now look at the Front Page on the wiki, you should see your changes
370 reflected there. Note that the pages all have the extension `.page`.
371
13b66f4 John MacFarlane Added support for the new mercurial filestore backend.
authored
372 If you are using the darcs or mercurial backend, the commands will
373 be slightly different. See the documentation for your VCS for
374 details.
375
53fb6c2 John MacFarlane Added notes on PDF caching and idle
authored
376 Performance
377 ===========
378
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
379 Caching
53fb6c2 John MacFarlane Added notes on PDF caching and idle
authored
380 -------
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
381
382 By default, gitit does not cache content. If your wiki receives a lot of
383 traffic or contains pages that are slow to render, you may want to activate
384 caching. To do this, set the configuration option `use-cache` to `yes`.
53fb6c2 John MacFarlane Added notes on PDF caching and idle
authored
385 By default, rendered pages, highlighted source files, and exported PDFs
386 will be cached in the `cache` directory. (Another directory can be
387 specified by setting the `cache-dir` configuration option.)
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
388
389 Cached pages are updated when pages are modified using the web
390 interface. They are not updated when pages are modified directly through
391 git or darcs. However, the cache can be refreshed manually by pressing
392 Ctrl-R when viewing a page, or by sending an HTTP GET or POST request to
393 `/_expire/path/to/page`, where `path/to/page` is the name of the page to
394 be expired.
395
396 Users who frequently update pages using git or darcs may wish to add a
397 hook to the repository that makes the appropriate HTTP request to expire
398 pages when they are updated. To facilitate such hooks, the gitit cabal
399 package includes an executable `expireGititCache`. Assuming you are
400 running gitit at port 5001 on localhost, and the environment variable
401 `CHANGED_FILES` contains a list of the files that have changed, you can
402 expire their cached versions using
403
404 expireGititCache http://localhost:5001 $CHANGED_FILES
405
406 Or you can specify the files directly:
407
408 expireGititCache http://localhost:5001 "Front Page.page" foo/bar/baz.c
409
410 This program will return a success status (0) if the page has been
411 successfully expired (or if it was never cached in the first place),
412 and a failure status (> 0) otherwise.
413
414 The cache is persistent through restarts of gitit. To expire all cached
415 pages, simply remove the `cache` directory.
416
53fb6c2 John MacFarlane Added notes on PDF caching and idle
authored
417 Idle
418 ----
419
420 By default, GHC's runtime will repeatedly attempt to collect garbage
421 when an executable like Gitit is idle. This means that gitit will, after
422 the first page request, never use 0% CPU time and sleep, but will use
423 ~1%. This can be bad for battery life, among other things.
424
425 To fix this, one can disable the idle-time GC with the runtime flag
426 `-I0`:
427
428 gitit -f my.conf +RTS -I0 -RTS
429
488e6bb README: Added instructions for proxying with apache.
John MacFarlane authored
430 Using gitit with apache
431 =======================
432
433 Most users who run a public-facing gitit will want gitit to appear
434 at a nice URL like `http://wiki.mysite.com` or
435 `http://mysite.com/wiki` rather than `http://mysite.com:5001`.
436 This can be achieved using apache's `mod_proxy`.
437
438 Proxying to `http://wiki.mysite.com`
439 ------------------------------------
440
441 Set up your DNS so that `http://wiki.mysite.com` maps to
442 your server's IP address. Make sure that the `mod_proxy` module is
443 loaded, and set up a virtual host with the following configuration:
444
445 <VirtualHost *>
446 ServerName wiki.mysite.com
447 DocumentRoot /var/www/
448 RewriteEngine On
449 ProxyPreserveHost On
450 ProxyRequests Off
451
452 <Proxy *>
453 Order deny,allow
454 Allow from all
455 </Proxy>
456
457 ProxyPassReverse / http://127.0.0.1:5001
458 RewriteRule ^(.*) http://127.0.0.1:5001$1 [P]
459
460 ErrorLog /var/log/apache2/error.log
461 LogLevel warn
462
463 CustomLog /var/log/apache2/access.log combined
464 ServerSignature On
465
466 </VirtualHost>
467
468 Reload your apache configuration and you should be all set.
469
470 Proxying to `http://mysite.com/wiki`
471 ------------------------------------
472
473 Make sure the `mod_proxy`, `mod_headers`, `mod_proxy_http`,
474 and `mod_proxy_html` modules are loaded. `mod_proxy_html`
475 is an external module, which can be obtained [here]
476 (http://apache.webthing.com/mod_proxy_html/). It rewrites URLs that
477 occur in web pages. Here we will use it to rewrite gitit's links so that
478 they all begin with `/wiki/`.
479
f8ab67e John MacFarlane Reformatting (line lengths) of README.
authored
480 First, tell gitit not to compress pages, since `mod_proxy_html` needs
481 uncompressed pages to parse. You can do this by setting the gitit
482 configuration option
488e6bb README: Added instructions for proxying with apache.
John MacFarlane authored
483
77d20a3 John MacFarlane README changes: running with darcs, updated some refs to config options...
authored
484 compress-responses: no
485
486 Second, modify the link in the `reset-password-message` in the
487 configuration file: instead of
488
489 http://$hostname$:$port$$resetlink$
490
491 set it to
492
493 http://$hostname$/wiki$resetlink$
488e6bb README: Added instructions for proxying with apache.
John MacFarlane authored
494
495 Restart gitit.
496
497 Now add the following lines to the apache configuration file for the
498 `mysite.com` server:
499
500 # These commands will proxy /wiki/ to port 5001
501
502 ProxyRequests Off
503
504 <Proxy *>
505 Order deny,allow
506 Allow from all
507 </Proxy>
508
509 ProxyPass /wiki/ http://127.0.0.1:5001/
510
511 <Location /wiki/>
512 SetOutputFilter proxy-html
513 ProxyPassReverse /
514 ProxyHTMLURLMap / /wiki/
515 RequestHeader unset Accept-Encoding
516 </Location>
517
518 Reload your apache configuration and you should be set.
519
520 For further information on the use of `mod_proxy_http` to rewrite URLs,
521 see the [`mod_proxy_html` guide].
522
523 [`mod_proxy_html` guide]: http://apache.webthing.com/mod_proxy_html/guide.html
524
e86d3dc John MacFarlane Added note on using gitit as a library to README.
authored
525 Using gitit as a library
526 ========================
527
528 By importing the module `Network.Gitit`, you can include a gitit wiki
529 (or several of them) in another happstack application. There are some
530 simple examples in the haddock documentation for `Network.Gitit`.
531
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
532 Reporting bugs
533 ==============
89725fd John MacFarlane Initial commit.
authored
534
a49ba22 John MacFarlane Added link to bug tracker on googlecode.
authored
535 Bugs may be reported (and feature requests filed) at
536 <http://code.google.com/p/gitit/issues/list>.
89725fd John MacFarlane Initial commit.
authored
537
41595ee John MacFarlane Added notice of mailing list to README.
authored
538 There is a mailing list for users and developers at
539 <http://groups.google.com/group/gitit-discuss>.
540
45a9c7f John MacFarlane Reformatted README using standard markdown.
authored
541 Acknowledgements
542 ================
89725fd John MacFarlane Initial commit.
authored
543
bb8abc3 John MacFarlane Improved acknowledgements, bringing list of contributors up to date.
authored
544 A number of people have contributed patches:
545
8500b29 John MacFarlane More contributors.
authored
546 - Gwern Branwen helped to optimize gitit and wrote the
f22d5c4 John MacFarlane Changed default config to use-cache: no.
authored
547 InterwikiPlugin. He also helped with the Feed module.
bb8abc3 John MacFarlane Improved acknowledgements, bringing list of contributors up to date.
authored
548 - Simon Michael contributed the patch adding RST support.
549 - Henry Laxen added support for password resets and helped with
550 the apache proxy instructions.
551 - Anton van Straaten made the process of page generation
552 more modular by adding Gitit.ContentTransformer.
058ce02 John MacFarlane Acknowledge Robin Green's patch in README.
authored
553 - Robin Green helped improve the plugin API and interface, and
554 fixed a security problem with the reset password code.
edeca79 More acknowledgements.
John MacFarlane authored
555 - Thomas Hartman helped improve the index page, making directory
312b9dc Added acknowledgements to README.
John MacFarlane authored
556 browsing persistent, and fixed a bug in template recompilation.
bb8abc3 John MacFarlane Improved acknowledgements, bringing list of contributors up to date.
authored
557 - Justin Bogner improved the appearance of the preview button.
8500b29 John MacFarlane More contributors.
authored
558 - Kohei Ozaki contributed the ImgTexPlugin.
312b9dc Added acknowledgements to README.
John MacFarlane authored
559 - Michael Terepeta improved validation of change descriptions.
cf6e15e John MacFarlane Added acknowledgement for mightybyte.
authored
560 - mightybyte suggested making gitit available as a library,
561 and contributed a patch to ifLoggedIn that was needed to
562 make gitit usable with a custom authentication scheme.
bb8abc3 John MacFarlane Improved acknowledgements, bringing list of contributors up to date.
authored
563
b8bf081 John MacFarlane Added thanks to darcs team in README.
authored
564 I am especially grateful to the darcs team for using darcsit for
565 their public-facing wiki. This has helped immensely in identifying
566 issues and improving performance.
567
bb8abc3 John MacFarlane Improved acknowledgements, bringing list of contributors up to date.
authored
568 Gitit's default visual layout is shamelessly borrowed from Wikipedia.
5c5c337 John MacFarlane Updated README.
authored
569 The stylesheets are influenced by Wikipedia's stylesheets and by the
570 bluetrip CSS framework (see BLUETRIP-LICENSE). Some of the icons in
571 `img/icons` come from bluetrip as well.
572
Something went wrong with that request. Please try again.