mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Change ruby to erb code blocks
This commit is contained in:
@@ -6,7 +6,7 @@ of pages up and running, you'll probably want a way to quickly navigate to
|
|||||||
them. You can add a quick listing of all the pages with a couple helpers
|
them. You can add a quick listing of all the pages with a couple helpers
|
||||||
provided by Middleman.
|
provided by Middleman.
|
||||||
|
|
||||||
```ruby
|
```erb
|
||||||
<ul>
|
<ul>
|
||||||
<% sitemap.resources.each do |resource| %>
|
<% sitemap.resources.each do |resource| %>
|
||||||
<li><%= link_to(resource.path, resource.path) %></li>
|
<li><%= link_to(resource.path, resource.path) %></li>
|
||||||
@@ -21,7 +21,7 @@ makes it easy to turn those into links.
|
|||||||
Because `resources` includes images and other assets, you may want to filter
|
Because `resources` includes images and other assets, you may want to filter
|
||||||
down to just `html` files which could look something like the following:
|
down to just `html` files which could look something like the following:
|
||||||
|
|
||||||
```ruby
|
```erb
|
||||||
<ul>
|
<ul>
|
||||||
<% sitemap.resources
|
<% sitemap.resources
|
||||||
.select { |resource| resource.path =~ /html$/ }
|
.select { |resource| resource.path =~ /html$/ }
|
||||||
|
|||||||
Reference in New Issue
Block a user