Add header_hashtag feature option: headers display a link icon when moused over so you can jump to sections
Move anchor processing into markup.rb Use dashes for spaces in the anchor hashtag
This commit is contained in:
@@ -134,6 +134,7 @@ module Gollum
|
||||
# site.
|
||||
# options - Optional Hash:
|
||||
# :universal_toc - Display table of contents on all pages. Default: false
|
||||
# :header_hashtags - Show links to headers. Default: true
|
||||
# :base_path - String base path for all Wiki links.
|
||||
# Default: "/"
|
||||
# :page_class - The page Class. Default: Gollum::Page
|
||||
@@ -166,6 +167,7 @@ module Gollum
|
||||
@history_sanitization = options[:history_sanitization] ||
|
||||
self.class.history_sanitization
|
||||
@universal_toc = options[:universal_toc] || false
|
||||
@header_hashtags = options[:header_hashtags] || true
|
||||
end
|
||||
|
||||
# Public: check whether the wiki's git repo exists on the filesystem.
|
||||
@@ -532,6 +534,9 @@ module Gollum
|
||||
# Toggles display of universal table of contents
|
||||
attr_reader :universal_toc
|
||||
|
||||
# Create hashtag link for headers to jump to sections
|
||||
attr_reader :header_hashtags
|
||||
|
||||
# Normalize the data.
|
||||
#
|
||||
# data - The String data to be normalized.
|
||||
|
||||
Reference in New Issue
Block a user