Mediawiki

From Steak Wiki
Jump to navigationJump to search

Mediawiki is what this site is. It's great. Much easier to digest information than a blog.

Mediawiki Docker Setup

todo

Mediawiki Navbox Setup

All mediawiki's should use the navbox. They are not in the default install though. So, some hoops must be jumped through. I will do my best to document this, and my steps should help anyone implementing this, however I can't confirm this will be 100% of what you need. However, it should get you most of the way there.

Roadmap

To install navbox we need to do the following:

  • Install Scribunto Extension, and get Lua enabled
  • Add some Module and Template pages to the custom wiki (Modules: Navbox,Arguments,Navbar and Template:Navbox)
  • LocalSettings.php of the mediawiki must have the scribuntu extension enabled
  • You must add a new Common.css file. It is placed in Mediawiki:Common.css (only admins can add this)

Install Scribunto

See https://www.mediawiki.org/wiki/Extension:Scribunto Straightforward. If you have docker, you'll have to make a volume for the extensions, something like the following in your docker-compose.yml:

 volumes:
      - ./mwiki_files/images/:/var/www/html/images
      # After initial setup, download LocalSettings.php to the same directory as
      # this yaml and uncomment the following line and use compose to restart
      # the mediawiki service
      # Note that it will create this file for you from the web setup.
      - ./mwiki_files/LocalSettings.php:/var/www/html/LocalSettings.php
      - ./mwiki_files/log/:/var/log/apache2/
      - ./mwiki_files/etc_apache/:/etc/apache2/
      # need extensions to add scribuntu to get modules to get navbox to work. ugh.
      - ./mwiki_files/extensions/:/var/www/html/extensions/
      - ./mwiki_files/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

Add some Module and Template pages

You need to copy and paste these from mediawiki.

   Template:Navbox
   Module:Arguments
   Module:Navbar
   Module:Navbox

And put them in the same pages on your wiki.

LocalSettings.php

Something like the following should be added to LocalSettings.php (the mediawiki customization page):

# End of automatically generated settings.
# Add more configuration options below.

#require_once "./extensions/Scribunto/Scribunto.php";

wfLoadExtension( 'Scribunto' );
$wgScribuntoDefaultEngine = 'luastandalone';

Further Reading

The Archives of Navbox can be stepped through (there are 30-40 now, so sit down, and allocate some time) to find where I figured this out from.