๐Ÿ„Deploy

Deploying a Mycorrhiza wiki is simple.

The rest of the instruction assumes you're using a UNIX-compatible operating system such as macOS or a distribution of GNU+Linux. If you're using Windows or any other obscure system, good luck, I have no knowledge of them. The process will be similar though.

Building

Dependencies

MycorrhizaWiki depends on several other programs in order to work.

Go

Go is a compiled programming language MycorrhizaWiki is written in. You need a recent version of Go installed. Get it at Go's website. Using your OS's repositories is not recommended because they may be out-of-date.

Git

Git is the most popular version control system. You probably have it installed. If not, consult your OS' repos or download from Git website.

Other dependencies

There is a Makefile in the source code. If you want to use it, you will need make which you probably have installed. If not, consult your OS' repos. You can also avoid using it by invoking the Go compiler directly.

The rest of the dependences will be fetched by the Go compiler automatically. Don't forget to put $GOPATH/bin into your $PATH.

Getting the source code

Visit the GitHub repository

You can download a .zip archive by clicking Code ยป Download ZIP or use this command (recommended):

git clone https://github.com/bouncepaw/mycorrhiza

If you want to also get a snapshot of this wiki for testing purposes, run this command instead:

git clone --recurse-submodules  https://github.com/bouncepaw/mycorrhiza

Either way, you should end up with a folder full of .go files. Let's assume it is located at ~/src/mycorrhiza.

Starting

Run make build. You will end up with an executable named mycorrhiza. This is the program you need.

If you have downloaded the snapshot, you can just run make run and have a running wiki on this address (it is also available in your local network but with a different address):

Creating a wiki

  1. Create a directory named, for example, wiki.
  2. Navigate to the directory and run git init. The wiki won't work without that.
  3. If you are planning to have hyphae named with unicode characters, also run that: git config core.quotepath false. You may not need to run that, depending on your environment configuration.

Running

To start a wiki, run:

~/src/mycorrhiza/mycorrhiza ~/path/to/your/wiki

Of course, you can move the mycorrhiza file anywhere. Your wiki can also be anywhere.

Run this command to see a short summary of configuration options:

~/src/mycorrhiza/mycorrhiza -help

Make sure that environment variable $XDG_DATA_HOME is set to a reasonable location. The recommended value is $HOME/.local/share. If you don't set it, the Mycorrhiza will probably figure everything out but it may fail.

What wiki folders should look like?

You can just base of the default wiki, metarrhiza. This way, you will have handy help built-in. The other option is to run the wiki on an empty repo. An interesting option is to run the wiki on any of your image collections. They'll appear as hyphae!

If you have a subfolder called static, you can customize the wiki behaviour. File static/favicon.ico is used as a favicon for the site. File static/common.css can be used to override default styles. Both are optional.

How to setup authorization?

See authorization