Code Monkey home page Code Monkey logo

gitit's Introduction

Gitit

Gitit is a wiki program written in Haskell. It uses Happstack for the web server and pandoc for markup processing. Pages and uploaded files are stored in a git, darcs, or mercurial repository and may be modified either by using the VCS's command-line tools or through the wiki's web interface. By default, pandoc's extended version of markdown is used as a markup language, but reStructuredText, LaTeX, HTML, DocBook, or Emacs Org-mode markup can also be used. Gitit can be configured to display TeX math (using texmath) and highlighted source code (using highlighting-kate).

Other features include

  • plugins: dynamically loaded page transformations written in Haskell (see "Network.Gitit.Interface")

  • categories

  • TeX math

  • syntax highlighting of source code files and code snippets (using highlighting-kate)

  • caching

  • Atom feeds (site-wide and per-page)

  • a library, "Network.Gitit", that makes it simple to include a gitit wiki in any happstack application

Getting started

Compiling and installing gitit

The most reliable way to install gitit from source is to get the stack tool. Then clone the gitit repository and use stack to install:

git clone https://github.com/jgm/gitit
cd gitit
stack install

Alternatively, instead of using stack, you can get the Haskell Platform and do the following:

cabal update
cabal install gitit

This will install the latest released version of gitit. To install a version of gitit checked out from the repository, change to the gitit directory and type:

cabal install

The cabal tool will automatically install all of the required haskell libraries. If all goes well, by the end of this process, the latest release of gitit will be installed in your local .cabal directory. You can check this by trying:

gitit --version

If that doesn't work, check to see that gitit is in your local cabal-install executable directory (usually ~/.cabal/bin). And make sure ~/.cabal/bin is in your system path.

Running gitit

To run gitit, you'll need git in your system path. (Or darcs or hg, if you're using darcs or mercurial to store the wiki data.)

Gitit assumes that the page files (stored in the git repository) are encoded as UTF-8. Even page names may be UTF-8 if the file system supports this. So you should make sure that you are using a UTF-8 locale when running gitit. (To check this, type locale.)

Switch to the directory where you want to run gitit. This should be a directory where you have write access, since three directories, static, templates, and wikidata, and two files, gitit-users and gitit.log, will be created here. To start gitit, just type:

gitit

If all goes well, gitit will do the following:

  1. Create a git repository, wikidata, and add a default front page.
  2. Create a static directory containing files to be treated as static files by gitit.
  3. Create a templates directory containing HStringTemplate templates for wiki pages.
  4. Start a web server on port 5001.

Check that it worked: open a web browser and go to http://localhost:5001.

You can control the port that gitit runs on using the -p option: gitit -p 4000 will start gitit on port 4000. Additional runtime options are described by gitit -h.

Using gitit

Wiki links and formatting

For instructions on editing pages and creating links, see the "Help" page.

Gitit interprets links with empty URLs as wikilinks. Thus, in markdown pages, [Front Page]() creates an internal wikilink to the page Front Page. In reStructuredText pages, `Front Page <>`_ has the same effect.

If you want to link to a directory listing for a subdirectory, use a trailing slash: [foo/bar/]() creates a link to the directory for foo/bar.

Page metadata

Pages may optionally begin with a metadata block. Here is an example:

---
format: latex+lhs
categories: haskell math
toc: no
title: Haskell and
  Category Theory
...

\section{Why Category Theory?}

The metadata block consists of a list of key-value pairs, each on a separate line. If needed, the value can be continued on one or more additional line, which must begin with a space. (This is illustrated by the "title" example above.) The metadata block must begin with a line --- and end with a line ... optionally followed by one or more blank lines. (The metadata block is a valid YAML document, though not all YAML documents will be valid metadata blocks.)

Currently the following keys are supported:

format : Overrides the default page type as specified in the configuration file. Possible values are markdown, rst, latex, html, markdown+lhs, rst+lhs, latex+lhs. (Capitalization is ignored, so you can also use LaTeX, HTML, etc.) The +lhs variants indicate that the page is to be interpreted as literate Haskell. If this field is missing, the default page type will be used.

categories : A space or comma separated list of categories to which the page belongs.

toc : Overrides default setting for table-of-contents in the configuration file. Values can be yes, no, true, or false (capitalization is ignored).

title : By default the displayed page title is the page name. This metadata element overrides that default.

Highlighted source code

If gitit was compiled against a version of pandoc that has highlighting support (see above), you can get highlighted source code by using delimited code blocks:

~~~ {.haskell .numberLines}
qsort []     = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
               qsort (filter (>= x) xs) 
~~~

To see what languages your pandoc was compiled to highlight:

pandoc -v

Configuring and customizing gitit

Configuration options

Use the option -f [filename] to specify a configuration file:

gitit -f my.conf

The configuration can be split between several files:

gitit -f my.conf -f additional.conf

One use case is to keep sensible part of the configuration outside of a SCM (oauth client secret for example).

If this option is not used, gitit will use a default configuration. To get a copy of the default configuration file, which you can customize, just type:

gitit --print-default-config > my.conf

The default configuration file is documented with comments throughout.

The static directory

On receiving a request, gitit always looks first in the static directory (or in whatever directory is specified for static-dir in the configuration file). If a file corresponding to the request is found there, it is served immediately. If the file is not found in static, gitit next looks in the static subdirectory of gitit's data file ($CABALDIR/share/gitit-x.y.z/data). This is where default css, images, and javascripts are stored. If the file is not found there either, gitit treats the request as a request for a wiki page or wiki command.

So, you can throw anything you want to be served statically (for example, a robots.txt file or favicon.ico) in the static directory. You can override any of gitit's default css, javascript, or image files by putting a file with the same relative path in static. Note that gitit has a default robots.txt file that excludes all URLs beginning with /_.

Note: if you set static-dir to be a subdirectory of repository-path, and then add the files in the static directory to your repository, you can ensure that others who clone your wiki repository get these files as well. It will not be possible to modify these files using the web interface, but they will be modifiable via git.

Using a VCS other than git

By default, gitit will store wiki pages in a git repository in the wikidata directory. If you'd prefer to use darcs instead of git, you need to add the following field to the configuration file:

repository-type: Darcs

If you'd prefer to use mercurial, add:

repository-type: Mercurial

This program may be called "darcsit" instead of "gitit" when a darcs backend is used.

Note: we recommend that you use gitit/darcsit with darcs version 2.3.0 or greater. If you must use an older version of darcs, then you need to compile the filestore library without the (default) maxcount flag, before (re)installing gitit:

cabal install --reinstall filestore -f-maxcount
cabal install --reinstall gitit

Otherwise you will get an error when you attempt to access your repository.

Changing the theme

To change the look of the wiki, you can modify custom.css in static/css.

To change the look of printed pages, copy gitit's default print.css to static/css and modify it.

The logo picture can be changed by copying a new PNG file to static/img/logo.png. The default logo is 138x155 pixels.

To change the footer, modify templates/footer.st.

For more radical changes, you can override any of the default templates in $CABALDIR/share/gitit-x.y.z/data/templates by copying the file into templates, modifying it, and restarting gitit. The page.st template is the master template; it includes the others. Interpolated variables are surrounded by $s, so literal $ must be backslash-escaped.

Adding support for math

To write math on a markdown-formatted wiki page, just enclose it in dollar signs, as in LaTeX:

Here is a formula:  $\frac{1}{\sqrt{c^2}}$

You can write display math by enclosing it in double dollar signs:

$$\frac{1}{\sqrt{c^2}}$$

Gitit can display TeX math in three different ways, depending on the setting of math in the configuration file:

  1. mathjax (default): Math will be rendered using the MathJax javascript.

  2. mathml: Math will be converted to MathML using texmath. This method works with IE+mathplayer, Firefox, and Opera, but not Safari.

  3. raw: Math will be rendered as raw LaTeX codes.

Restricting access

If you want to limit account creation on your wiki, the easiest way to do this is to provide an access-question in your configuration file. (See the commented default configuration file.) Nobody will be able to create an account without knowing the answer to the access question.

Another approach is to use HTTP authentication. (See the config file comments on authentication-method.)

Authentication through github

If you want to authenticate the user from github through oauth2, you need to register your app with github to obtain a OAuth client secret and add the following section to your configuration file:

[Github]
oauthclientid: 01239456789abcdef012
oauthclientsecret: 01239456789abcdef01239456789abcdef012394
oauthcallback: http://mysite/_githubCallback
oauthoauthorizeendpoint: https://github.com/login/oauth/authorize
oauthaccesstokenendpoint: https://github.com/login/oauth/access_token
## Uncomment if you are checking membership against an organization and change
## gitit-testorg to this organization:
# github-org: gitit-testorg

The github authentication uses the scope user:email. This way, gitit gets the email of the user, and the commit can be assigned to the right author if the wikidata repository is pushed to github. Additionally, it uses read:org if you uses the option github-org to check membership against an organization.

To push your repository to gitub after each commit, you can add the file post-commit with the content below in the .git/hooks directory of your wikidata repository.

#!/bin/sh
git push origin master 2>> logit

Plugins

Plugins are small Haskell programs that transform a wiki page after it has been converted from Markdown or another source format. See the example plugins in the plugins directory. To enable a plugin, include the path to the plugin (or its module name) in the plugins field of the configuration file. (If the plugin name starts with Network.Gitit.Plugin., gitit will assume that the plugin is an installed module and will not look for a source file.)

Plugin support is enabled by default. However, plugin support makes the gitit executable considerably larger and more memory-hungry. If you don't need plugins, you may want to compile gitit without plugin support. To do this, unset the plugins Cabal flag:

cabal install --reinstall gitit -f-plugins

Note also that if you compile gitit for executable profiling, attempts to load plugins will result in "internal error: PAP object entered!"

Accessing the wiki through git

All the pages and uploaded files are stored in a git repository. By default, this lives in the wikidata directory (though this can be changed through configuration options). So you can interact with the wiki using git command line tools:

git clone ssh://my.server.edu/path/of/wiki/wikidata
cd wikidata
vim Front\ Page.page  # edit the page
git commit -m "Added message about wiki etiquette" Front\ Page.page
git push

If you now look at the Front Page on the wiki, you should see your changes reflected there. Note that the pages all have the extension .page.

If you are using the darcs or mercurial backend, the commands will be slightly different. See the documentation for your VCS for details.

Performance

Caching

By default, gitit does not cache content. If your wiki receives a lot of traffic or contains pages that are slow to render, you may want to activate caching. To do this, set the configuration option use-cache to yes. By default, rendered pages, and highlighted source files will be cached in the cache directory. (Another directory can be specified by setting the cache-dir configuration option.)

Cached pages are updated when pages are modified using the web interface. They are not updated when pages are modified directly through git or darcs. However, the cache can be refreshed manually by pressing Ctrl-R when viewing a page, or by sending an HTTP GET or POST request to /_expire/path/to/page, where path/to/page is the name of the page to be expired.

Users who frequently update pages using git or darcs may wish to add a hook to the repository that makes the appropriate HTTP request to expire pages when they are updated. To facilitate such hooks, the gitit cabal package includes an executable expireGititCache. Assuming you are running gitit at port 5001 on localhost, and the environment variable CHANGED_FILES contains a list of the files that have changed, you can expire their cached versions using

expireGititCache http://localhost:5001 $CHANGED_FILES

Or you can specify the files directly:

expireGititCache http://localhost:5001 "Front Page.page" foo/bar/baz.c

This program will return a success status (0) if the page has been successfully expired (or if it was never cached in the first place), and a failure status (> 0) otherwise.

The cache is persistent through restarts of gitit. To expire all cached pages, simply remove the cache directory.

Idle

By default, GHC's runtime will repeatedly attempt to collect garbage when an executable like Gitit is idle. This means that gitit will, after the first page request, never use 0% CPU time and sleep, but will use ~1%. This can be bad for battery life, among other things.

To fix this, one can disable the idle-time GC with the runtime flag -I0:

gitit -f my.conf +RTS -I0 -RTS

Note:

To enable RTS, cabal needs to pass the compile flag -rtsopts to GHC while installing.

cabal install --reinstall gitit --ghc-options="-rtsopts"

Using gitit with apache

Most users who run a public-facing gitit will want gitit to appear at a nice URL like http://wiki.mysite.com or http://mysite.com/wiki rather than http://mysite.com:5001. This can be achieved using apache's mod_proxy.

Proxying to http://wiki.mysite.com

Set up your DNS so that http://wiki.mysite.com maps to your server's IP address. Make sure that the mod_proxy, mod_proxy_http and mod_rewrite modules are loaded, and set up a virtual host with the following configuration:

<VirtualHost *>
    ServerName wiki.mysite.com
    DocumentRoot /var/www/
    RewriteEngine On
    ProxyPreserveHost On
    ProxyRequests Off

    <Proxy *>
       Order deny,allow
       Allow from all
    </Proxy>

    ProxyPassReverse /    http://127.0.0.1:5001
    RewriteRule ^(.*) http://127.0.0.1:5001$1 [P]

    ErrorLog /var/log/apache2/error.log
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

</VirtualHost>

Reload your apache configuration and you should be all set.

Using nginx to achieve the same

Drop a file called wiki.example.com.conf into /etc/nginx/conf.d (or where ever your distribution puts it).

server {
    listen 80;
    server_name wiki.example.com
    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/wiki.example.com.log main;
}

Reload your nginx config and you should be all set.

Proxying to http://mysite.com/wiki

Make sure the mod_proxy, mod_headers, mod_proxy_http, and mod_proxy_html modules are loaded. mod_proxy_html is an external module, which can be obtained [here] (http://apache.webthing.com/mod_proxy_html/). It rewrites URLs that occur in web pages. Here we will use it to rewrite gitit's links so that they all begin with /wiki/.

First, tell gitit not to compress pages, since mod_proxy_html needs uncompressed pages to parse. You can do this by setting the gitit configuration option

compress-responses: no

Second, modify the link in the reset-password-message in the configuration file: instead of

http://$hostname$:$port$$resetlink$

set it to

http://$hostname$/wiki$resetlink$

Restart gitit.

Now add the following lines to the apache configuration file for the mysite.com server:

# These commands will proxy /wiki/ to port 5001

ProxyRequests Off

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

ProxyPass /wiki/ http://127.0.0.1:5001/

<Location /wiki/>
  SetOutputFilter  proxy-html
  ProxyPassReverse /
  ProxyHTMLURLMap  /   /wiki/
  ProxyHTMLDocType "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>" XHTML
  RequestHeader unset Accept-Encoding
</Location>

Reload your apache configuration and you should be set.

For further information on the use of mod_proxy_http to rewrite URLs, see the mod_proxy_html guide.

Using gitit as a library

By importing the module Network.Gitit, you can include a gitit wiki (or several of them) in another happstack application. There are some simple examples in the haddock documentation for Network.Gitit.

Reporting bugs

Bugs may be reported (and feature requests filed) at https://github.com/jgm/gitit/issues.

There is a mailing list for users and developers at http://groups.google.com/group/gitit-discuss.

Acknowledgements

A number of people have contributed patches:

  • Gwern Branwen helped to optimize gitit and wrote the InterwikiPlugin. He also helped with the Feed module.
  • Simon Michael contributed the patch adding RST support.
  • Henry Laxen added support for password resets and helped with the apache proxy instructions.
  • Anton van Straaten made the process of page generation more modular by adding Gitit.ContentTransformer.
  • Robin Green helped improve the plugin API and interface, and fixed a security problem with the reset password code.
  • Thomas Hartman helped improve the index page, making directory browsing persistent, and fixed a bug in template recompilation.
  • Justin Bogner improved the appearance of the preview button.
  • Kohei Ozaki contributed the ImgTexPlugin.
  • Michael Terepeta improved validation of change descriptions.
  • mightybyte suggested making gitit available as a library, and contributed a patch to ifLoggedIn that was needed to make gitit usable with a custom authentication scheme.

I am especially grateful to the darcs team for using darcsit for their public-facing wiki. This has helped immensely in identifying issues and improving performance.

Gitit's default visual layout is shamelessly borrowed from Wikipedia. The stylesheets are influenced by Wikipedia's stylesheets and by the bluetrip CSS framework (see BLUETRIP-LICENSE). Some of the icons in img/icons come from bluetrip as well.

gitit's People

Contributors

akerbos avatar ayamada avatar batterseapower avatar bmillwood avatar bos avatar conal avatar duairc avatar freiric avatar gwern avatar icefoxen avatar imuli avatar jefdaj avatar jgm avatar joehillen avatar juhp avatar karlicoss avatar larose avatar mightybyte avatar mwu avatar octalsrc avatar petegallagher avatar qnikst avatar rufflewind avatar segasai avatar sternenseemann avatar tianyicui avatar vsivsi avatar vtdmhd avatar wcaleb avatar zaxtax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitit's Issues

build error in Network/Gitit/Types.hs:315:66

This is with ghc-6.12.1

Building gitit-0.7.3.8...
[ 1 of 19] Compiling Paths_gitit ( dist/build/autogen/Paths_gitit.hs, dist/build/Paths_gitit.o )
[ 2 of 19] Compiling Network.Gitit.Feed ( Network/Gitit/Feed.hs, dist/build/Network/Gitit/Feed.o )
[ 3 of 19] Compiling Network.Gitit.Server ( Network/Gitit/Server.hs, dist/build/Network/Gitit/Server.o )
[ 4 of 19] Compiling Network.Gitit.Types ( Network/Gitit/Types.hs, dist/build/Network/Gitit/Types.o )

Network/Gitit/Types.hs:315:66:
Couldn't match expected type Either FilePath L.ByteString' against inferred typeL.ByteString'
In the first argument of return', namelyL.empty'
In the second argument of mplus', namelyreturn L.empty'
In a stmt of a 'do' expression:
fc <- liftM inputValue (lookInput "file") mplus return L.empty
cabal: Error: some packages failed to install:
gitit-0.7.3.8 failed during the building phase. The exception was:
ExitFailure 1

CapitalizeEmphasisPlugin fails to compile: processWith not found

What steps will reproduce the problem?

  1. Add CapitalizeEmphasisPlugin.hs to the list of plugins to load

What is the expected output? What do you see instead?
Expected: should load
Actual:
/home/greenrd/git/gitit/data/CapitalizeEmphasisPlugin.hs:18:30:
Not in scope: `processWith'
gitit: Error loading plugin:
/home/greenrd/git/gitit/data/CapitalizeEmphasisPlugin.hs

What version of the product are you using? On what operating system?
gitit 0.6 on Linux

Google Code Info:
Issue #: 31
Author: [email protected]
Created On: 2009-02-27T13:49:45.000Z
Closed On: 2009-03-25T16:32:13.000Z

Word-wrapped heading has no vertical space between lines

What steps will reproduce the problem?

  1. Go to the URL /Issues/Grouping ignores unexpandable URLs?edit on a gitit
    wiki

What is the expected output? What do you see instead?
The long page heading is word-wrapped as expected, but "URLs", which is
wrapped to the next line, is too close to the previous line - there is no
vertical gap at all between that line and the previous line. This makes it
harder to read, and it looks ugly.

What version of the product are you using? On what operating system?
gitit 0.5.1 on Linux

Please provide any additional information below.
Using Firefox 3.1 beta 2
My X server thinks my display DPI (dots per inch) is 75x75

Google Code Info:
Issue #: 18
Author: [email protected]
Created On: 2009-02-02T08:34:26.000Z
Closed On: 2009-02-03T07:35:32.000Z

Login only works with Firefox?

To reproduce:

  1. Create an account
  2. Try to log in with Opera or Safari

I can't quite figure out why, but Opera or Safari won't let me log in. It
might have something to do with the redirect?

I'm on OS X.

Google Code Info:
Issue #: 1
Author: [email protected]
Created On: 2008-12-08T10:37:27.000Z
Closed On: 2008-12-15T15:53:53.000Z

noEdit can be circumvented by uploading a new version of the page

What steps will reproduce the problem?

  1. Ensure that at least one page, e.g. Help.page, is listed in noEdit in
    the configuration.
  2. Upload some random file, changing its name to Help.page and selecting
    "overwrite file".

What is the expected output? What do you see instead?
This should be prevented. Instead, the upload goes ahead and the page has
been edited.

What version of the product are you using? On what operating system?
gitit 0.5 on Linux

Google Code Info:
Issue #: 10
Author: [email protected]
Created On: 2009-01-26T12:08:20.000Z
Closed On: 2009-01-26T17:09:06.000Z

"No suitable handler found" if I press the Discard button

What steps will reproduce the problem?

  1. Create a new page, but don't save it
  2. Click the Discard button

What is the expected output? What do you see instead?
Expected something other than an error message. I see "No suitable handler
found"

What version of the product are you using? On what operating system?
gitit 0.5.1 on Linux

Please provide any additional information below.
Firefox 3.1 beta 2
I had entered some text, but then changed my mind and deleted it.
My page title contains spaces in it, and a directory (which exists).

Google Code Info:
Issue #: 19
Author: [email protected]
Created On: 2009-02-02T15:36:30.000Z
Closed On: 2009-02-03T07:40:05.000Z

Server error if you try to get raw page source of non-existent page

What steps will reproduce the problem?

  1. Go to a non-existent page
  2. Click Raw page source

What is the expected output? What do you see instead?
Expect a user-friendly error message explaining that the page does not
exist. I get:

Server error: Unable to retrieve page contents.

What version of the product are you using? On what operating system?
gitit 0.5.3 on Linux

Please provide any additional information below.
The page never existed.

Google Code Info:
Issue #: 29
Author: [email protected]
Created On: 2009-02-13T14:57:44.000Z
Closed On: 2009-04-30T00:57:22.000Z

Building relies on datetime-0.1 which requires old-time >= 1.0.0.1

Fresh install on a clean system.

Trying to cabal install gitit on OSX Leopard leads to this dead-end,
where I can't find anything about old-time >= 1.0.0.1. Other cabal installs
have gone fine, and I managed to get pandoc up and running after some funky
reinstalling of pcre-light.

To confirm this issue, I tried the same thing on an Ubuntu 8.10 VM.

I'm no Haskell expert, so please close this if it's an obvious setup error.

Google Code Info:
Issue #: 13
Author: [email protected]
Created On: 2009-01-29T00:32:10.000Z
Closed On: 2009-01-29T03:56:09.000Z

Feature request: save drafts automatically

Since the commit of a file makes changes permanent, it should be
relatively easy to automaticall save drafts of a file (using an ajax call)
while editting. You could just write to the file or maybe even use git's
'staging area' (git add).

Google Code Info:
Issue #: 3
Author: [email protected]
Created On: 2008-12-11T12:32:16.000Z
Closed On: 2009-03-25T16:34:44.000Z

Pandoc delimited code blocks <> strikethrough

When I write something like (while markdown is set as default):
~~~ {.opal}
DEF height = \ v0, alpha . (square(v0)/(2_g))_square(sin(alpha))
DEF width = \ v0, alpha . (square(v0)/g)_sin(2_alpha)
~~~
I get:
~ {.opal}

DEF height = \ v0, alpha . (square(v0)/(2g))square(sin(alpha))
DEF width = \ v0, alpha . (square(v0)/g)sin(2alpha)

Am I missing a setting here or is this a bug?

Repository Structure > Wiki Structure

Hey,

I know about the possibility of representing some kind of tree structure by naming your files like:
toplevel/second/third

However I'd love to be able to maintain some kind of healthy directory structure inside wikidata. That means for the example above that toplevel and second are actual directories on my filesystem.

Is that possible?

Plugins

It would be great to add plugin functionality. Pandoc SVN already contains
what is needed, so when pandoc is released, it should be a simple matter to
add a plugins field to gitit config, allowing users to write their own page
transformations.

Google Code Info:
Issue #: 16
Author: [email protected]
Created On: 2009-02-01T19:14:40.000Z
Closed On: 2009-04-26T20:10:40.000Z

Allow empty summaries

Sometimes you don't want to enter a description of your changes. A default
summary (" " or something) could be used if the user doesn't enter anything
in the description of changes box.

Google Code Info:
Issue #: 25
Author: [email protected]
Created On: 2009-02-11T10:27:34.000Z
Closed On: 2009-06-26T01:18:56.000Z

[feature] authentication

I see two things missing to the auth system used by gitit :

  • anonymous editing mode
  • disable account creation

thanks for this great software !

Literate haskell support

It would be great if pages could be written in literate haskell, once the
next version of pandoc is released (with lhs support).

The only question is how to indicate that a page is lhs?

A simple idea would be to require something like

in the first line of the file.

Google Code Info:
Issue #: 17
Author: [email protected]
Created On: 2009-02-01T19:19:26.000Z
Closed On: 2009-06-06T19:46:05.000Z

captcha registration

title says it all :p

great software btw, this is what wiki software should all be like. leave the bulk of the work (rcs / syntax parsing) to other more powerful/standardised programs.

More problems with having a page and directory with the same name

What steps will reproduce the problem?

  1. Create a directory (/CS458 in my case) with some pages.
  2. Visit /CS458 with the goal of adding this page.

What is the expected output? What do you see instead?
I see either the usual "This page does not exist, click here to create it";
or it offers a directory listing (including the option to create this page).

Instead, it gives the error message:
Server error: wikidata/CS458: openBinaryFile: inappropriate type (is a
directory)

What version of the product are you using? On what operating system?
gitit from git, on Arch Linux. Latest patch is
412b212, plus my patch to bodge on
GraphViz support (which is highly unlikely to affect this bug either way)

Please provide any additional information below.
My preferred expected behaviour would definitely be a directory listing
(perhaps a percursor to categories?) with an option to create the top-level
page myself. Of course, the usual "This page does not exist" page would be
perfectly fine, even better if it notes "A directory with this name exists."
My use case here is to have a page for each course I'm taking this term,
and a directory for each. The top-level page has general details: midterm
date, prof's office hours, etc.; the dir contains pages for lecture notes,
assignments.

The following steps will repair things, so I can actually have such a setup:

  1. touch CS458.page
  2. git add CS458.page
  3. git commit -m ... CS458.page
    This creates, as expected, an empty page, and browsing to /CS458 works now.

Google Code Info:
Issue #: 20
Author: [email protected]
Created On: 2009-02-03T14:47:52.000Z
Closed On: 2009-03-25T16:32:48.000Z

Directory and page with the same name

What steps will reproduce the problem?

  1. Create a page (mine was CS486)
  2. Create a directory with the same name, and a page inside it (mine was
    CS486/Adversarial Search)
  3. Attempt to view the page (CS486).

What is the expected output? What do you see instead?
The page with the same name as the directory should display normally. (It
did before the directory was created)

The error message:
Server error: wikidata/CS486: openBinaryFile: inappropriate type (is a
directory)
is displayed instead.

What version of the product are you using? On what operating system?
0.5, on Arch Linux.

Please provide any additional information below.

Google Code Info:
Issue #: 15
Author: [email protected]
Created On: 2009-01-31T22:31:45.000Z
Closed On: 2009-02-01T16:38:06.000Z

Dot plugin fails to load: ghc link error

What steps will reproduce the problem?

  1. Add DotPlugin.hs to the list of plugins to be loaded

What is the expected output? What do you see instead?
Expected: Should load
Actual:
Loading plugin '/home/greenrd/git/gitit/data/DotPlugin.hs'...gitit:
/usr/lib/ghc-6.10.1/ghc-6.10.1/HSghc-6.10.1.o: unknown symbol
editlinezm0zi2zi1zi0_SystemziConsoleziEditlineziReadline_a46_closure' gitit: gitit: unable to load packageghc-6.10.1'

What version of the product are you using? On what operating system?
gitit 0.6 on Linux

Google Code Info:
Issue #: 32
Author: [email protected]
Created On: 2009-02-27T14:03:29.000Z
Closed On: 2009-02-27T17:51:49.000Z

[feature] Specify interface to bind

For setups which include running gitit behind apache, explicit binding to just the loopback interface would be nice. E.g. specify the interface via command line option when starting gitit.

Feature: archiving external links in WebCite

https://secure.wikimedia.org/wikipedia/en/wiki/WebCite
http://webcitation.org/

It's an on-demand archiving service; like the Internet Archive (except
without the ~9 month wait their free service entails).

I think it'd be neat to have support for archiving links in Gitit. I
know it bothers me to link an article or essay somewhere and discover
that it's vanished a few years later, and manually archiving each page
and including each link in my work is tedious.

So what should it do? I think it should, by default, send an archive
request for all links to websites which are publicly accessible - and
no more. The issues here are privacy and security and also
presentation, but publicly accessible websites shouldn't be an issue.
(If one links to http://yahoo.com, I can't imagine what objection one
would have to WebCite backing it up; and if one links to
127.0.0.1:8000/supersecret, then WebCite can't find it, much less back
it up.)

This would be easy to implement if there were some sort of
'post-record hook' run after a page/revision is saved. All such a
feature would have to do is get the public URL of the 'new' wiki page,
and then feed it to webcitation.org - the parsing and multiple
requests apparently are already handled:
http://www.jmir.org/2005/5/e60

"Authors may also cache multiple URLs by initiating a "combing" of a
manuscript for URLs (currently this only works for HTML manuscripts).
A request to comb the outbound links from a given HTML manuscript
leads the WebCite server to present a checklist of outbound links from
a manuscript to the user, who can then choose to archive the content
of any of the outgoing links."

( http://webcitation.org/comb also works on uploads of 'HTMl-esque'
formats, so presumably the post-record hook could also work by getting
the filename instead, Pandoc converting it to HTML, and then
uploading.)

As a side-benefit, because wiki pages like http://lhc.seize.it/Notes
link to other pages which the 'comb' feature would catch, eventually
most/all wiki pages would be archived as well - constituting an
informal backup system in addition to the DVCS aspects.

I'm not going to suggest adding anything to the 'presentation' layer;
that's another discussion entirely. (Should all new external links be
accompanied by a little floating [Archived] link? What of the myriads
of styles would be best? Should they be auto-added for links detected
as 404'd? Should they replace broken links entirely? What policies
should be in place for them? etc.) But I think a basic feature
'request archival of external links' would be valuable.

Google Code Info:
Issue #: 7
Author: [email protected]
Created On: 2009-01-08T19:03:37.000Z
Closed On: 2009-06-25T18:32:04.000Z

Feature: interwiki links

https://secure.wikimedia.org/wikipedia/en/wiki/Help:Interwiki_linking

Interwiki linking allows easier linking to other wikis. Instead of manually
tracking down and pasting in a link like
'[https://secure.wikimedia.org/wikipedia/en/wiki/Prediction_market]', one
could instead just do '[[en:Prediction market]]'.

They are easier to create, much easier to read, shorten the source, are
more future proof and reliable*, and a general good idea all-around.

  • Admittedly in the case of the English Wikipedia, it's very unlikely that
    links to en.wikipedia.org/ will cease to work in the foreseeable future.
    However, the Wikia corporation renamed all its domains a year or two ago,
    breaking essentially every hard-coded link to its many popular wikis. Those
    thousands of links which had been done using interwiki links didn't; the
    mapping of abbreviations to expansions - the interwiki table - was edited
    as soon as the transition happened and always worked.

Google Code Info:
Issue #: 8
Author: [email protected]
Created On: 2009-01-09T03:00:03.000Z
Closed On: 2009-04-26T20:10:15.000Z

Possible problem with bot edits causing breakage of darcs' hash assumption

From my reading of http://wiki.darcs.net/DarcsWiki/NamedPatch it seems that
darcs considers two patches to be the "same" if the have the same log
message, timestamp, and author.

So, on a gitit wiki with a darcs backend, a bot could theoretically make
two edits in quick succession, within less than a second, with the same log
message, and thus create two patches that darcs would incorrectly consider
equal.

Google Code Info:
Issue #: 27
Author: [email protected]
Created On: 2009-02-12T15:21:45.000Z
Closed On: 2009-02-13T03:11:29.000Z

CSS problems in Internet Explorer

Layout does not display correctly in IE 7 or 8.
The main text box appears far to the right, and everything is centered.

Google Code Info:
Issue #: 33
Author: [email protected]
Created On: 2009-02-28T07:17:35.000Z
Closed On: 2009-03-25T16:31:23.000Z

Cannot create account 0.4.3.2 or 0.5

What steps will reproduce the problem?

  1. cabal install -fhighlighting pandoc gitit
  2. open firefox
  3. delete cookie
  4. start gitit
  5. enter user name
  6. enter email
  7. enter password

What is the expected output? What do you see instead?
login
iirc "not human enough"

What version of the product are you using? On what operating system?
0.5
archlinux 2.6.28
Please provide any additional information below.

Google Code Info:
Issue #: 12
Author: [email protected]
Created On: 2009-01-27T11:31:23.000Z
Closed On: 2009-02-14T03:16:14.000Z

Server error if user tries to delete page which does not exist

What steps will reproduce the problem?

  1. Go to a page which does not exist
  2. Click the Delete link
  3. Confirm

What is the expected output? What do you see instead?
I expect to see a user-friendly error. I get:

Server error: UnknownError: Could not darcs record Issues/Foo.page darcs
failed: None of the files you specified exist!

What version of the product are you using? On what operating system?
gitit 0.5.3 on Linux

Please provide any additional information below.
The page never existed.

Google Code Info:
Issue #: 28
Author: [email protected]
Created On: 2009-02-13T14:55:41.000Z
Closed On: 2009-04-26T21:22:03.000Z

Store static content in repository

It would be nice to be able to store some of the static content, such as
the HTML template and CSS files, in the git repository where changes could
be tracked. It would be especially nice to allow users (perhaps only some
users) to edit these files through the web interface.

Google Code Info:
Issue #: 30
Author: [email protected]
Created On: 2009-02-13T18:34:49.000Z
Closed On: 2009-02-14T02:03:22.000Z

ghc7 compatibility

The gitit package currently has some depencies that use Base-3.*
and this prevents ghc7 from being able to build gitit!
:)

Can't log in again after session expires (without manually deleting cookies)

bug report from Hugo Pacheco (hpacheco at gmail dot com):

At some point when logged in, the session expires and the wiki prompts
again for the login information. However, the cookies still assume we are
logged in and do not allow me to log in again.
The solution is to remove the cookies for the wiki server.
I think this is some kind of bug with the session state.

Google Code Info:
Issue #: 4
Author: [email protected]
Created On: 2008-12-11T14:36:46.000Z
Closed On: 2008-12-27T19:21:35.000Z

Table of contents isn't created

versions: happstack 0.4.1, gitit 0.7.2, pandoc 1.4.
issue: Table of contents directive is ignored, no toc is created. Furthermore, no anchor tags are appended to headers, so inline linking between sections also fails. I've talked this around on IRC and it seems other users are having similar issues.

Build error

While installing the latest gitit with "cabal install gitit" under OS X 10.6.4 and GHC 6.10.4, the following error occurred:

oak:Applications jonathan$ cabal install gitit
Resolving dependencies...
Configuring strict-concurrency-0.2.3...
Preprocessing library strict-concurrency-0.2.3...
Building strict-concurrency-0.2.3...

Control/Concurrent/MVar/Strict.hs:46:7:
Could not find module Control.OldException': it is a member of the hidden packagebase'
Use -v to see a list of the files searched for.

cabal: Error: some packages failed to install

Any idea how to fix this? Thanks!

Command line option for printing default config

It would be useful if gitit would provide an option like
--print-default-config to do the obvious thing. It could be used as a basis
for creating customized configuration, whereas now I need to go to some web
page and to find it there, without any notice whether it is up to date or not.

Google Code Info:
Issue #: 24
Author: [email protected]
Created On: 2009-02-10T19:14:48.000Z
Closed On: 2009-02-10T21:22:07.000Z

Race condition

We've encountered this a few times:

  1. Two people commit simultaneously
  2. One of the edits succeeds (by guy A)
  3. Guy B gets the merge page, commits
  4. In the repo there is now a commit by A that contains B's changes. A's changes have disappeared

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.