Giter Club home page Giter Club logo

olelo's Introduction

Ōlelo Wiki

{{https://badge.fury.io/rb/olelo.png|Gem}} {{https://secure.travis-ci.org/minad/olelo.png?branch=master|Build Status}} {{https://gemnasium.com/minad/olelo.png?travis|Dependency Status}} {{https://codeclimate.com/github/minad/moneta.png|Code Climate}}

Ōlelo is a wiki that stores pages in a Git repository, supports many markup styles and has an extensible, hackable architecture! If you want to see a demo installation go to http://www.gitwiki.org/.

Features

Ōlelo implements a plugin system. A lot of the features are implemented as plugins and can be activated or deactivated as you wish.

Core features:

  • Edit, move or delete pages
  • Page attribute editor
  • Support for hierarchical wikis (directory structure)
  • File upload
  • History, commit and diff view
  • Locales, currently supported languages Czech, English, French, German

Features, implemented by plugins:

  • Support for many markup languages (Creole, Markdown, Textile, ...)
  • RSS/Atom changelog for whole wiki or pages
  • Section editing for Creole and Markdown markup
  • Embedded LaTeX formulas (Rendered as image or using MathJax
  • Syntax highlighted embedded code blocks
  • Image resizing, SVG to PNG/JPEG conversion
  • Auto-generated table of contents
  • Wiki syntax can be extended with tags (gist, math, footnotes, ...)
  • Editor preview
  • View pages as S5 presentation
  • Privacy features: Access control lists, Private wiki which needs login, readonly wiki

Quick start

The best way to install Ōlelo is via 'gem'.

$ gem install olelo

Go to a git repository via command line and start the Ōlelo webserver.

$ olelo

Point your web browser at http://localhost:8080/. This is all you have to do, now you are good to go to use your wiki!

Installation from source

Installation from source is especially useful if you want to do development or use the newest features.

Clone the git repository:

git clone git://github.com/minad/olelo.git

Now change to the Ōlelo source directory and use Bundler to install the dependencies.

$ cd olelo
$ bundle install

Start the Ōlelo webserver from the Ōlelo source directory.

$ bin/olelo

Deployment

For production purposes, I recommend that you deploy the wiki with Unicorn. You should use the rackup configuration from the Ōlelo source or gem directory.

$ unicorn path-to/config.ru

Unicorn is a very flexible ruby application server and Ōlelo runs very well on it. You can adapt the number of Unicorn workers depending on the load you expect. It is a good idea to observe the Unicorn workers as described in https://github.com/blog/519-unicorn-god and kill missbehaving workers if necessary. You can call this snippet in a cronjob which terminates all workers gracefully that need more than 100M.

#!/bin/bash
ps -e -www -o pid,rss,command | grep '[u]nicorn worker' | while read -r -a a; do
        pid=${a[0]}
        mem=${a[1]}
        [[ "$mem" -gt 100000 ]] && kill -s QUIT $pid
done

Configuration

For deployment you might want to tweak some settings. Ōlelo reads the files 'config/config.yml.default' and 'config/config.yml' in that order. So just copy the default configuration 'config/config.yml.default' to 'config/config.yml' and make your modifications. If you installed Ōlelo as gem this is not a good idea since you don't want to fiddle in the gem directory. For this purpose the environment variable '$OLELO_CONFIG' exists which can point to the configuration file that you want to use.

export OLELO_CONFIG=/home/olelo/olelo_config.yml

You can also use the '$OLELO_CONFIG' environment variable if you want to run multiple Ōlelo instances with different configurations, for example to serve different pages from different repositories.

Setting up a private wiki using Apache

Assuming the wiki server is running on localhost:5000 (e.g. unicorn), we can redirect Apache requests by adding the following lines to your virtual host. This works also with https.

# Private wiki
ProxyPass /wiki http://localhost:5000
ProxyPassReverse /wiki http://localhost:5000
ProxyPreserveHost On
ProxyRequests Off
RequestHeader set X-Forwarded-Proto https
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

In your Ōlelo 'config.yml' you should set the following options:

base_path: '/wiki'

# Enable the private wiki plugin
disabled_plugins:
  - security/readonly_wiki
  #- security/private_wiki
  - editor/recaptcha

authentication:
  enable_signup: false

Dependencies

If you installed Ōlelo as gem or used Bundler you don't really have to care about the dependencies. The standard installation provides the core dependencies and a good selection of optional dependencies.

Core dependencies:

Some dependencies are optional, for example depending on the markup you want to use.

Development

Important concepts

  • Plugin architecture
  • Aspects under 'plugins/aspects' which provide different 'views' for a page
  • Filters under 'plugins/filters' which make it possible to build up aspects from a filter chain. These aspects are configured under 'config/aspects.rb'
  • Tags are provided by the 'plugins/tags/main.rb' plugin and can be integrated in a filter chain. They look like html tags and can be used to extend the wiki syntax.

Tipps

  • Execute 'rake --tasks' to see the available development tasks
  • Activate development mode by setting the option 'production: false' in 'config/config.yml'
  • Increase the log verbosity by setting 'log.level: DEBUG' in 'config/config.yml'
  • Do not hesitate to create an issue at the issue tracker

Authors

Git-Wiki was originally developed by Simon Rozet. The development of Ōlelo to its current state was done by Daniel Mendler and contributors. The current code base doesn't have much in common with the original Git-Wiki proof-of-concept.

Contributors:

  • Alex Eagle
  • Alex Wall
  • Hrvoje
  • Korthaerd
  • Luca Greco
  • Pavel Suchmann
  • Raffael Schmid

License

Ōlelo is released under the MIT license.

olelo's People

Contributors

bolasblack avatar bver avatar ccss-sandia avatar driehuis avatar eagleas avatar hrefhref avatar luxflux avatar minad avatar rpl avatar rtomayko avatar schacon avatar shados avatar sr 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

olelo's Issues

Allow edits/creation only if logged in?

I've set up security to point to a yml file.

I would like to configure olelo to only allow creating/editing
pages if a user is logged in.

Is there a way to do this in Olelo?

If there's a better place to ask these questions, please point me to a forum, mailing list, etc.
Thanks,
--Nate

Error when creating pages with spaces in the name

Steps to reproduce:

  • Type something in the search bar (necessary to bring up the "New Page" button, which isn't visible when viewing a page)
  • Click "New Page"
  • Enter the name of the page, e.g.: Foo Bar
  • Enter some text in the body and a commit message and click "Save"

Result:

  • The user sees the message "Foo Bar exists already"
  • A message is written to stdout:

[2010-02-04 17:51:26] ERROR URI::InvalidURIError: bad URI(is not URI?): http://localhost:9454/Foo Bar
/usr/lib64/ruby/1.8/uri/generic.rb:732:in merge' /usr/lib64/ruby/1.8/webrick/httpresponse.rb:164:insetup_header'
/usr/lib64/ruby/1.8/webrick/httpresponse.rb:102:in send_response' /usr/lib64/ruby/1.8/webrick/httpserver.rb:79:inrun'
/usr/lib64/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in each' /usr/lib64/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:23:in start' /usr/lib64/ruby/1.8/webrick/server.rb:82:instart'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in run' /usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:instart'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in start' /usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:4 /usr/bin/rackup:19:inload'
/usr/bin/rackup:19

The page is created correctly and can be accessed by clicking on it in the tree view.

Ignore extension/clean URLs

This issue is related to a comment on http://github.com/minad/olelo/issues#issue/29/comment/401218

If I have a file named foo.org, then http://mysite/foo would render foo.org if there's not a file named exactly 'foo', and if no other files match foo.*.

This would obviate the need to specifically define an engine for files that don't use the default rendering engine.

As a bonus, perhaps there could be a configuration setting in the .yml file to tell olelo what priority
the extensions are. For example, if I have foo.org, and foo.md then I could define an order ".org .md" and olelo would by default render foo.org when a user goes to http://mysite/foo

--Nate

Gallery functionality not optimal...

Using the Gallery Plugin with 10 files in a directory. Only a few htumbnails are generated, then most of the time something crashes. different error messages... Or no message and complete stall...

One (the most frequent) message:
zlib(finalizer): Zlib::GzipWriter object must be closed explicitly.
zlib(finalizer): the stream was freed prematurely.

Another (not often seen):
Zlib::DataError: invalid stored block lengths

Tried some fiddling with caching and deflater... No success and no light... Resizing takes place in line 30, image.rb? Maybe take this into account: http://www.imagemagick.org/Usage/formats/#jpg_read

Relative links in /new page

open a URL to create new page e.g. localhost:8080/new/Overview and move the mouse over other links (for instance links from the Sidebar).

Result:
All Links gets the prefix "new"

treeview does not work with rewrite_base

The culprit is this line, which does not respect a non "/" URL root:

./plugins/treeview/jquery.treeview.js: if(!options.url) options.url = '/sys/treeview.json';

I've had a quick go at fixing it but failed - got any thoughts?

unclosed tags causes olelo to hang

If I mistakenly use an html 1.0 tag in a wiki page such as:

<br>

instead of the proper xhtml tag:

<br/>

then olelo hangs in tag.rb. A quick fix that keeps olelo from hanging (but unfortunately does not infer what the user meant):

diff --git a/plugins/filter/tag.rb b/plugins/filter/tag.rb
index 2613ed8..d2ec8a7 100644
--- a/plugins/filter/tag.rb
+++ b/plugins/filter/tag.rb
@@ -95,7 +95,7 @@ class TagSoupParser
   def get_content
     stack = [@name]
     text = ''
-    while !stack.empty?
+    while !stack.empty? and [email protected]?
       case @content
       # Tag begins
       when /\A<(#{NAME})/

Latex matrices

In short, the below renders fine (aside from the rows arguably being too close together):

\begin{matrix}
a_{11}x_1 & + & a_{12}x_2 & + & \cdots & + & a_{1n}x_n & = & c_1
a_{21}x_1 & + & a_{22}x_2 & + & \cdots & + & a_{2n}x_n & = & c_2
\vdots & & \vdots & & \ddots &
\end{matrix}
\

While this apparently doesn't render at all:

\begin{matrix}
a_{11}x_1 & + & a_{12}x_2 & + & \cdots & + & a_{1n}x_n & = & c_1
a_{21}x_1 & + & a_{22}x_2 & + & \cdots & + & a_{2n}x_n & = & c_2
\vdots & & \vdots & & \ddots & & \vdots
\end{matrix}
\

attribute file name

I suggest to name the attribute files .PageName instead of PageName/attributes, this way we can avoid moving the PageName file to PageName/content if attributes are added, also the repository structure looks better this way, reflects the page paths better and there are no unnecessary directories just for storing some attributes

for the index/root page we could use a page called Index with its attributes in .Index

html entities in filter output

if there are html entities in the filter output, like &ndash; or &hallip; (although &amp; does not seem to cause a problem) the following happens:

  • in preview mode: no content is displayed
  • after saving: these html entities are removed

(I tried this with an emacs orgmode filter which generates html from org documents using emacs)

Check-out Tilt

Tilt's become pretty popular. I've used it for a number of projects myself. I think if you submitted a patch for Creole support (real easy, I did the RDoc support myself), you could use Tilt for git-wiki and get support for many other markup types too.

http://github.com/rtomayko/tilt

kramdown dosen't support/render extended markdown syntax

kramdown dosen't support render extended markdown syntax like tables:

http://kramdown.rubyforge.org/syntax.html

|-----------------+------------+-----------------+----------------|

Default aligned Left aligned Center aligned Right aligned
First body part Second cell Third cell fourth cell
Second line foo strong baz
Third line quux baz bar
-----------------+------------+-----------------+----------------
Second body
2 line
=================+============+=================+================
Footer row
-----------------+------------+-----------------+----------------

Multiple repositories

I remember reading somewhere that you can specify multiple repositories in the config.yml. Is that true? If so, what’s the syntax? Thanks.

redirect no longer working

When we first started using git-wiki, we imported our entire usemod wiki into /Oldwiki. As we edited pages in /Oldwiki, we would first move them to / and create a redirect in /Oldwiki to the new page. These redirect pages have the content:

redirect: /Path/To/Page

It appears that the latest Olelo no longer supports this. I have tried creating a filter to support this redirect but to no avail. Any suggestions on the right way to implement this feature?

(or if you just add the feature back I would be just as happy, but I would like to be more unlost in the plugin system)

Deploying with phusion passenger

I’m trying to deploy with Phusion Passenger. Here are the steps I’m following, if anyone wants to try the same. Running into the first error now, probably a dependency thing (I’m new to ruby)?

environment: Ubuntu 9.10 running Ruby 1.8, installed the required gems.

I cloned the git-wiki repository
Following
http://www.modrails.com/documentation/Users%20guide.html#_deploying_a_rack_based_ruby_application
I added a tmp and a public folder since they are required for passenger to function

Made a virtual host and rebooted apache

Visiting the application @ http://dev.liketightpants.net/ gives a passenger error page:
no such file to load -- cgi/util

Is that a gem that I can install?

Must put ?output=image at the end of images?

I'm trying to display an image in a Markdown file: http://notesmine.com/grails_vim.md

I have tried every variation of the Markdown syntax for including images, and all
I get is the Alt text rendered.

The markdown syntax is like this:
Alt text

If I use this:

Alt text

Then the image renders correctly on the page.

Is this the desired functionality?

Thanks,
--Nate

Links are always relative to the current directory

The links - as much as I understand - should be relative to the root, not to the current folder.

  • if i have a page /Folder/Something, and on that page I make a link [[Else]], than it will link to /Folder/Else.
  • The same [[Else]] link on the page /Something will link to /Else.

This means that effectively I can link only downstream, and e.g. links in the sidebar will change at every single page.

Using non ascii characters makes pages non-editable

Using the wiki creole backend.

Editing pages works fine, until I insert a non ascii character (like a typographic quote ‘, or an é). Saving works, but trying to then edit gives an error:

Test2 is a Creole Wiki Text (text/x-creole) and cannot be edited like a text file.

Commit bcafcc65 breaks html rendering: <link>bla</link>

With bcafcc6, on my machine (using nokogiri (1.4.3.1)) in the head of a page the closing /link-statement is missing:

|link href="/static/images/favicon.png?1" rel="shortcut icon" type="image/png"|

where the pipes "|" should be <>... how can I escape these silly thing... anyway... there should be a line like

|link href="/static/images/favicon.png?1" rel="shortcut icon" type="image/png"||/link|

which is generated using
69040d8

Reverting the commit solves the problem...

kramdown: editsection

Hi

can add editsection for kramdown (markdown). This make life much easier ;).

Thx!

redmine plugin

it would be nice if olelo was available as a redmine plugin, replacing the default wiki in there

Any idea how hard would it be to do this?

visiting unknown pages with spaces in the name produces a blank page

Instead of the usual redirect to /new, visiting a page with a space in the name, e.g.:

http://localhost:9454/Foo%20Bar

produces a blank page:

The above text after the colon is a blank page that I've pasted in here. :)

Stdout contains the message:

[2010-02-04 17:56:10] ERROR URI::InvalidURIError: bad URI(is not URI?): http://localhost:9454/Foo Bar/new
/usr/lib64/ruby/1.8/uri/generic.rb:732:in merge' /usr/lib64/ruby/1.8/webrick/httpresponse.rb:164:insetup_header'
/usr/lib64/ruby/1.8/webrick/httpresponse.rb:102:in send_response' /usr/lib64/ruby/1.8/webrick/httpserver.rb:79:inrun'
/usr/lib64/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in each' /usr/lib64/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib64/ruby/1.8/webrick/server.rb:23:in start' /usr/lib64/ruby/1.8/webrick/server.rb:82:instart'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in run' /usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:instart'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in start' /usr/lib64/ruby/gems/1.8/gems/rack-1.1.0/bin/rackup:4 /usr/bin/rackup:19:inload'
/usr/bin/rackup:19

I believe git-wiki should be redirecting to:

http://localhost:9454/Foo%20Bar/new

instead of:

http://localhost:9454/Foo Bar/new

but my blindly modifying git-wiki to call uri_escape prevented uri's like:

http://localhost:9454/Foo/Bar Baz

from working.

500 errors when navigating tree with multiple levels, blog-style

How to reproduce (starting with olelo rev ca375f4)

  • rm -rf .wiki
  • start unicorn
  • Create new page with path /Blog/2010/12/23/test
  • Navigate to http://localhost:8080/Blog. This correctly shows 2010 as a child.
  • Click on 2010, and you get a server failure (error 500)
    Unicorn log just shows:
    127.0.0.1 - - [23/Dec/2010 11:12:58] "GET /Blog/2010 HTTP/1.1" 500 - 0.0200

Same occurs if you try to use the tree view in the sidebar. Clicking on the folder '2010' does nothing, and the unicorn log shows a 500 error.

  • Additional problem: there is no backtrace shown. Even setting 'production: false' doesn't give any more info either on the console or in the browser. So I have no idea where to start looking in the code for where this exception was raised.

Note that http://localhost:8080/Blog/2010/12 has the same problem, but http://localhost:8080/Blog/2010/12/23 shows its child correctly.

Platform: ubuntu 10.10, stock ruby 1.8.7p299

Side issue: I also can't get the blog renderer to work. I can't render /Blog/2010/12 (see above), but if I try to create it, it says "Path is reserved"

New Wiki fails to render /new

I grabbed master and copied it to olelo in my home dir. After getting all of the required (and optional) gems, copying the config and changing the title (and also removing the modified config)
I started it with unicorn and got the big pink box with this:

This page contains the following errors:

error on line 2 at column 645: Opening and ending tag mismatch: link line 0 and head
Below is a rendering of the page up to the first error.

Olelo = {"path":"","page_name":"","page_new":true,"page_modified":false,"page_path":"","page_title":"Root","page_version":"","page_next_version":"","page_previous_version":"","page_mime":"text/x-creole","default_mime":"text/x-creole","user_logged_in":true,"user_name":"10.16.64.79"};My Project - New Page

XML parsing error on edit page

after modifying attributes I get this error: (with latest git)

XML Parsing Error: not well-formed
<option value="orgmode" selected>

should be selected="selected", there's a similar error for the checked attribute of checkboxes

Update files in work dir for non-bare repo

if repo type is non-bare the checked out files should be updated in the repo after a commit
(i tried to fix this with a post-commit hook but hooks does not seem to be run either)

Write tagging indexer and editor

A background job should scan the tags of the pages and create a tag index.
Todo: Select simple system for background job. Cron, MQ-based...?

XML Parsing Error

It was easy to get up an running, but when I went to save my first edit I got this:

XML Parsing Error: not well-formed
Location: http://0.0.0.0:9292/
Line Number 1, Column 113:git log '--format=tformat:%H%n%P%n%T%n%an%n%ae%n%at%n%cn%n%ce%n%ct%n%x00%s%n%b%x00' '-1' 2>&1: fatal: unrecognized argument: --format=tformat:%H%n%P%n%T%n%an%n%ae%n%at%n%cn%n%ce%n%ct%n%x00%s%n%b%x00
----------------------------------------------------------------------------------------------------------------^

Mismatched tag

Hello,
I installed the latest version of olelo, and I presume that the site
is running. But, when I go to the home page, I get the error message:

XML Parsing Error: mismatched tag. Expected: .
Location: http://jquery.crazynate.com/new/500.shtml
Line Number 10, Column 3:
--^

The site is here:
http://jquery.crazynate.com

There's no data in the git repository, so the error might stem from that.

Can anyone point me in the right direction?

The version of git on the server is 1.7.2.2, and the ruby version is: 1.8.7

Thanks,
--Nate

Question: Blog-capabilities?

Does anyone have suggestions for ways to use Olelo as a blog?

I've tried Jekyll, but like Olelo because of its ability to render org-mode files, and
because it incorporates search and can be edited from the Web.

Perhaps I could have pages tagged with "blog", and display those on the main/index page.

Would it be relatively trivial to include Disqus comments into my blog pages in Olelo? Disqus is a service that allows comments on any html page, but does the spam filtering, etc. for you.

Thanks,
--Nate

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.