<% # Required parameters: # - formula: The formula hash object # - base_path: Path prefix for formula links (e.g., '' or '../') # Optional parameters: # - show_homepage: Show homepage link (default: false) # - show_dependencies: Show dependency badges (default: false) # - show_last_modified: Show last modified time (default: false) formula_name = formula['name'].to_s return if formula_name.empty? formula_slug = formula_name.gsub(/[^a-z0-9._-]/i, '-') formula_slug = formula_name if formula_slug.empty? formula_description = formula['description'].to_s # Check if methods exist (they're defined as singleton methods in PartialContext) show_homepage = respond_to?(:show_homepage) ? self.show_homepage : false show_dependencies = respond_to?(:show_dependencies) ? self.show_dependencies : false show_last_modified = respond_to?(:show_last_modified) ? self.show_last_modified : false %>

<%= h(formula_name) %>

<%= h(formula_description) %>

<% if show_homepage && formula['homepage'] %>

Homepage

<% end %>
<% if show_last_modified && formula['last_modified'] %>
Updated <%= format_relative_time(formula['last_modified']) %>
<% end %>
<% if formula['license'] %> License: <%= h(formula['license'].to_s) %> <% end %> <% if formula['version'] %> v<%= h(formula['version'].to_s) %> <% end %> <% if show_dependencies %> <% Array(formula['dependencies']).compact.each do |dep| %> dep: <%= h(dep.to_s) %> <% end %> <% end %>