Skip to content
trans edited this page Jul 21, 2012 · 4 revisions

Properties

Each Gollum wiki can store individual settings in the _settings.yml file at the root of the repository. This file can store the following options:

General Properties

  • url - The URL where the website will be accessible.
  • title - The title of the site. This is displayed at the top of each page.
  • author - Name and optionally email address of the webmaster.
  • date_format - Format of dates. Default is %B %d, %Y.
  • exclude - List of files and file globs to exclude from site.
  • include - List of files and file globs to explicitly include, that would otherwise be excluded. Files with names stating with _ or . are automatically excluded for instance.

Deployment Properties

NOTE: Deployment functionality is not fully in place as of v0.6.0, so these don't actually do anything yet, but it wouldn't hurt to set them up for when they do.

  • site_origin - If deployment is handled via another git repository, give it's remote address.
  • site_branch - If the repository uses a special branch, give it here. For example, gh-pages.
  • site_stage - Directory to stage files for deployment, if staging is required. For example this might be used if deployment is handled via a zip archive. The path is relative to the wiki's directory unless an absolute path is used.
  • site_sync - Smeagol uses rsync to copy files to the stage directory. The default command is rsync -arv --del --exclude .git* '%s/' '%s/', where the first %s is the source and the second %s is the stage path.

Note that the site settings can be given as a sub-mapping, e.g.

  site:
    stage: ../site
    origin: [email protected]:rubyworks/smeagol.git
    branch: gh-pages

Special View Properties

  • index - Which page to use as the index.html page. Default is Home.
  • rss - Offer an automatic RSS feed at /rss.xml for post pages.
  • source_url - The URL for the source code project that the wiki represents.
  • ribbon - Enables the GitHub ribbon. This field takes two space-separated values: color and position. Valid color values are: red, green, darkblue, orange, gray and white. Valid position values are: left and right. If the position is omitted then it defaults to right. If a non-valid color value is specified the it is assumed to be a relative or absolute URL. Note that the source_url is required in order to show the ribbon.
  • tracking_id - Your Google Analytics tracking id. The Google Analytics JavaScript tracking code will be inserted into your page automatically.
  • menu - An array of menu items. Each menu item should have a title and an href property set. The href can specify another page in the wiki or a URL outside of the wiki.

Example

This is an example of the settings.yml file used for Smeagol:

title: Smeagol
source_url: http://github.com/benbjohnson/smeagol
ribbon: red right
tracking_id: UA-1234567-8

menu:
  - title: Home
    href: /
  - title: Command Line
    href: /Command-Line-Interface
  - title: Settings
    href: /Settings
  - title: Templates
    href: /Templates
  - title: Misc
    href: /Miscellaneous
Clone this wiki locally