WebRI  WebRI::Longfish

[Validate]
Generated with WebRI Redfish 1.2

Longfish Template

The Longfish tempolate is based on John Long’s design of the ruby-lang.org website. It was built to supply Ruby core and stadard documentation with an “offical” look, but there’s no reason you can’t use it for your project too, if you prefer it.

Public Instance Methods

index_description() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 55
    def index_description
      @index_description ||= parse_index_header[1]
    end
index_title() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 49
    def index_title
      @index_title ||= parse_index_header[0]
    end
parse_index_header() click to toggle source

TODO: Generalize for all generators (?)

# File lib/webri/generators/longfish/generator.rb, line 61
    def parse_index_header
      if options.main_page && main_page = files_toplevel.find { |f| f.full_name == options.main_page }
        desc = main_page.description
        if md = /^\s*\<h1\>(.*?)\<\/h1\>/.match(desc)
          title = md[1]
          desc = md.post_match
        else
          title = options.main_page
        end
      else
        title = options.title
        desc = "This is the API documentation for '#{title}'."
      end
      return title, desc
    end
path() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 23
    def path
      @path ||= Pathname.new(__FILE__).parent
    end
site_community() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 33
    def site_community
      metadata.mailinglist || metadata.wiki
    end
site_homepage() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 28
    def site_homepage
      metadata.homepage
    end
site_news() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 43
    def site_news
      metadata.blog
    end
site_repository() click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 38
    def site_repository
      metadata.development
    end

Disabled; run with --debug to generate this.