Web site theme

Galaxia provides a theme for MoinMoin wiki engine intended to be used in gNewSense official Web site. This theme is based on the default “modern” theme distributed with MoinMoin 1.9.x, but adds the following features:

  1. Custom navigation bar: adds links to the main sections of the Web site.
  2. Breadcrumbs: shows your current location in the Web site’s page hierarchy.
  3. Translations widget: lists translations for the current page. The list of languages available are the same languages supported by MoinMoin.
  4. Custom footer: adds information about gNewSense and license of the text and media in the Web site.
A screen shot of the Web site theme showing its main components.

Web site theme anatomy


This theme is being tested with the quick, or desktop, installation provided by MoinMoin 1.9.x. The following steps are for installing the theme in such a configuration. Note that these steps assume you have a copy of Galaxia in which you’ll find the website-theme directory with the appropriate files.

  1. Download MoinMoin 1.9.x.

  2. Put galaxia/website-theme/galaxia.py file in the moin-1.9.x/wiki/data/plugin/theme directory.

  3. Put galaxia/website-theme/galaxia directory in moin-1.9.x/MoinMoin/web/static/htdocs.

  4. Modify moin-1.9.x/wikiconfig.py file to assign the gNewSense logo to the logo_string variable:

    logo_string = u'<img src="%s/galaxia/img/gnewsense.png" alt="gNewSense">' % url_prefix_static
  5. Add the following variable to LocalConfig class in moin-1.9.x/wikiconfig.py file. The language_default variable is used by the Translations widget.

    # Language configuration
    language_default = 'en'
  6. Run moin-1.9.x/wikiserver.py.

  7. Open your browser and go to http://localhost:8080/.

  8. Create a user by clicking on “Login”.

  9. Login as the user you created and select galaxia theme from your user preferences.

Enabling MoinMoin navigation bar

Wiki header without bookmarks

Wiki header without bookmarks

Wiki header with bookmarks

Wiki header with bookmarks

Galaxia theme doesn’t use MoinMoin Navigation bar by default, but you can still enable it.

  1. Open galaxia/website-theme/galaxia.py.
  2. Look for the def header(self, d, **kw) method and uncomment the line #self.navibar() by removing the # character.
  3. Save the file and restart MoinMoin to see the changes.

Translating the theme

The Web site theme adds some text that doesn’t have translations in the translations catalogs provided by MoinMoin. This means that the text in the Custom navigation bar and the title of the Translations widget will display in English only. To be able to see these additional texts in any of the languages supported by MoinMoin, you can use page dictionaries.

For example, if you want to translate the theme into Spanish, create a page called SpanishDict and add the following dictionary to it:

Development:: Desarrollo
Documentation:: Documentación
Download:: Descargar
Home:: Inicio
Support:: Ayuda
Translations:: Traducciones

Read MoinMoin’s Help on dictionaries for more information.

Adding more languages to the translations widget

By default, the languages listed in the Translations widget are the same languages supported by MoinMoin. To add a new language to the list, you can add a new translation catalog to MoinMoin/i18n, either in your local installation of MoinMoin or, better yet, in the MoinMoin project.