MrAro

Documentation

MrAro Website Muncher feeds on Markdown text files, digest them through PHP templates and "produces" steaming hot, fully formed webpages.

  1. Install
  2. Themes
  3. Nginx pretty URLs
  4. License

MrAro comes packaged with the following programs:
- The PHP port of Markdown
- pagedown (minified)
- nativesortable (minified)

Install

You can download MrAro from here.
To install it, go to the folder mra/admin and run the init script:

cd mra/admin
./mra_init

This will create:

Make sure that the server's PHP has permission to write in content and mra/tmp.

Username and Password

Edit the hidden file mra/.creds, keeping the first line for your username and the second one for your password. By default it looks like this:

user
pass

Important

You must tell your server to deny access to hidden files from the outside (or at least to the .creds file). To do that, follow the instructions here.


Themes

The template and CSS are located in the mra/theme/default folder. To edit the theme, first make a copy of the default folder.

cp mra/theme/default mra/theme/my-theme

Then in mra/mra.conf, edit the theme line replacing default by the name of your new theme (here my-theme).


Pretty URLs with Nginx

When serving a MrAro site from the domain's root, you can turn on pretty URLs (ie: mysite.com/?q=hello.md becomes mysite.com/hello) by adding the following to your NGINX configuration file's server block, in place of the usual location block):

if (!-d $request_filename) {
  rewrite ^/(.*)/$ /$1 permanent;
}

location / {
  try_files $uri $uri/ /?q=$uri.md;
}

location ~ \.(gif|jpg|png|ico)$ {
  try_files $uri /?i=$uri;
}

Then, add this line to your mra.conf file, and you're good to go:

nginx_url = true

License

MrAro and its dependencies are Open Source Software.