diff --git a/app/views/apitome/docs/_all_examples.html.erb b/app/views/apitome/docs/_all_examples.html.erb index 374538e..51cb11e 100644 --- a/app/views/apitome/docs/_all_examples.html.erb +++ b/app/views/apitome/docs/_all_examples.html.erb @@ -1,6 +1,9 @@ <% resources.each do |resource| %>

<%= resource['name'] %>

+ + <%= render partial: 'resource_explanation', locals: { explanation: resource['explanation'] } if resource['explanation'] %> + <% resource['examples'].each do |example| %> <% link = example['link'].gsub('.json', '') %>
diff --git a/app/views/apitome/docs/_resource_explanation.html.erb b/app/views/apitome/docs/_resource_explanation.html.erb new file mode 100644 index 0000000..1aa7b91 --- /dev/null +++ b/app/views/apitome/docs/_resource_explanation.html.erb @@ -0,0 +1,3 @@ +
+ <%= raw rendered_markdown(explanation.strip_heredoc) %> +