Creating A Wiki Engine With GitLab & Gollum


Saturday, 12 Jan 2019 Kudzai Nyandoro

Introduction

A few months ago I discovered something that I had been looking for a very long time. I was looking for a tool to write notes with using my favorite text editor Vim and my favorite markup language Markdown. I also wanted to be able to search and view my notes, and use version control on my local machine. Then I accidentally discovered the GitLab wiki tool while I was exploring the platform. GitLab has a great wiki engine that runs on the Gollum wiki system. This tool can serve many purposes such as sharing knowledge or creating a personal knowledge base that is easy to save and retrieve information from. When the memory fails, the personal wiki can come in handy. This also can also be a great learning tool for developers and anyone else.

Getting Started

In this tutorial, we are going to learn about how to set up our own wiki engine on our local machine using Gitlab and the Gollum wiki engine. Before we get started we need to make sure that you have a registered account with GitLab. In addition to this we will need to have Git and Ruby installed on your local machine. If you don't have any of these installed you can try using the Install Rails to install all the basics mentioned above. You can also search online to find and learn about alternative ways to install the above. I also have written and created screencasts on Version Control and Ruby and you can find these on my website kode47. I have also provided links in the resources section below. Are you ready? Let us get started!

Basic Setup

Visit https://gitlab.com and log in or register.

Click on the green button to New Project button on the top right side of the screen to create your remote repository. Give it a title of your choice.

Click on the Wiki link on the bottom left side of the screen.

Click on the Create yourfirst page` link.

Click on Clone Repository on the top right side of the screen.

Install the Gollum gem.

$ gem install gollum

Install the Markdown gem.

$ gem install github-markdown

Clone your wiki project.

$git clone git@gitlab.com:kcny/kode47.wiki.git

Enter into your project directory.

$ cd kode47.wiki

Fire up your local server.

$ gollum

This is what you should see in your terminal.

== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop

Go to your browser and type in 0.0.0.0:4567 or localhost:4567. You should now be able to see your wiki on your local server.

Enter into your wiki project folder and create a page home.md

$ cd my_wiki_project

To create a linked page just type in [Page Title](Page Title)

Go back to your browser and try to search for anything you what to find in. For more, please see the resources page below or search for what you need using your favorite search engine.

Resources

Version Control With Git

Version Control Setup

Github Remote Repository

Introduction to Ruby

GitLab Wiki

Markdown Guide

Markdown Cheatsheet

Install Rails