Sha256: 6a18c0d6cc279853147118b5baf6d4d1258d96555367b049ef67fc3c38076d73

Contents?: true

Size: 310 Bytes

Versions: 6

Compression:

Stored size: 310 Bytes

Contents

# For plugin authors who need to generate urls pointing to ther doc pages.
module DocsFilters
  def docs_source_url(input)
    if input =~ /github.com/
      label = "GitHub"
    else
      label = "source"
    end
    "<a href='#{input}'>#{label}</a>"
  end
end

Liquid::Template.register_filter(DocsFilters)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
octopress-docs-0.0.15 lib/octopress-docs/liquid_filters.rb
octopress-docs-0.0.14 lib/octopress-docs/liquid_filters.rb
octopress-docs-0.0.13 lib/octopress-docs/liquid_filters.rb
octopress-docs-0.0.12 lib/octopress-docs/liquid_filters.rb
octopress-docs-0.0.11 lib/octopress-docs/liquid_filters.rb
octopress-docs-0.0.10 lib/octopress-docs/liquid_filters.rb