diff --git a/README.md b/README.md index 9e89676..19194f9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,23 @@ nimforum ======== -This is Nimrod's forum. The code depends on the RST parser of -the Nimrod compiler and on Jester. +This is Nimrod's forum. The code depends on the RST parser of the Nimrod +compiler and on Jester. The code generating captchas for registration uses the +[cairo module](http://nimrod-code.org/cairo.html), which requires you to have +the [cairo library](http://cairographics.org) installed when you run the forum, +or you will be greeted by a cryptic error message similar to: + $ ./forum could not load: libcairo.so(1.2) + +If you are using macosx and have installed the ``cairo`` library through +[MacPorts](https://www.macports.org) you still need to add the library path to +your ``LD_LIBRARY_PATH`` environment variable. Example: + + $ LD_LIBRARY_PATH=/opt/local/lib/ ./forum + +Replace ``/opt/local/lib`` with the correct path on your system. + +# Copyright Copyright (c) 2012-2013 Andreas Rumpf, Dominik Picheta. diff --git a/forum.nim b/forum.nim index 51e20fe..c95b80d 100644 --- a/forum.nim +++ b/forum.nim @@ -806,6 +806,11 @@ get "/newthread/?": resp genMain(c, genFormPost(c, "donewthread", "New thread", "", "", false), "Nimrod Forum - New Thread") +const licenseRst = slurp("static/license.rst") +get "/license": + createTFD() + resp genMain(c, rstToHtml(licenseRst), "Forum content license") + when isMainModule: docConfig = rstgen.defaultConfig() math.randomize() diff --git a/main.tmpl b/main.tmpl index b0e15f5..f9bc30e 100644 --- a/main.tmpl +++ b/main.tmpl @@ -78,6 +78,7 @@