Skip to content

Commit

Permalink
support for resource 'explanation' property
Browse files Browse the repository at this point in the history
  • Loading branch information
George Riley committed Sep 7, 2016
1 parent b618c5d commit 4a6520d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/apitome/docs/_all_examples.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% resources.each do |resource| %>
<section class="example" id="<%= id_for(resource['name']) %>">
<h1 class="resource-name"><%= resource['name'] %></h1>
<%= render partial: 'resource_explanation', locals: { explanation: resource['explanation']} if resource['explanation'] %>
<% resource['examples'].each do |example| %>
<% link = example['link'].gsub('.json', '') %>
<article id="<%= id_for(link) %>">
Expand Down
3 changes: 3 additions & 0 deletions app/views/apitome/docs/_resource_explanation.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<article class="resource-explanation explanation">
<%= raw rendered_markdown(explanation.strip_heredoc) %>
</article>

0 comments on commit 4a6520d

Please sign in to comment.