Skip to content

Customizing rendering settings

Dawa Ometto edited this page Jan 24, 2023 · 3 revisions

Using the --config option, you can specify a config.rb file that allows you to override some of the settings that gollum uses for determining how to render various markups. For example, if you want to disable gollum's built in syntax highlighting feature for asciidoc (in order to use the asciidoctor rendering gem's built-in syntax highlighting), you could achieve this by setting the skip_filters option as follows:

module Gollum
  class Markup
    register(:asciidoc, "AsciiDoc", :skip_filters => [:Tags, :Code], :enabled => MarkupRegisterUtils::gem_exists?("asciidoctor"))
    # Note: the `:Tags` filter is skipped for asciidoc by default. It can be removed from `:skip_filters` to enable Gollum tags for asciidoc.
  end
end

See the markups.rb file in gollum-lib for the ways in which various formats are registered with gollum. See Custom-rendering-gems for more customization options,