diff --git a/README.md b/README.md index 637c388..78b9f36 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_649 TILs and counting..._ +_650 TILs and counting..._ --- @@ -490,6 +490,7 @@ _649 TILs and counting..._ - [Construct A Constant From A String](ruby/construct-a-constant-from-a-string.md) - [Create an Array of Stringed Numbers](ruby/create-an-array-of-stringed-numbers.md) - [Create A Hash From An Array Of Arrays](ruby/create-a-hash-from-an-array-of-arrays.md) +- [Create Listing Of All Middleman Pages](ruby/create-listing-of-all-middleman-pages.md) - [Create Thumbnail Image For A PDF](ruby/create-thumbnail-image-for-a-pdf.md) - [Defaulting To Frozen String Literals](ruby/defaulting-to-frozen-string-literals.md) - [Destructuring Arrays In Blocks](ruby/destructuring-arrays-in-blocks.md) diff --git a/ruby/create-listing-of-all-middleman-pages.md b/ruby/create-listing-of-all-middleman-pages.md new file mode 100644 index 0000000..a249113 --- /dev/null +++ b/ruby/create-listing-of-all-middleman-pages.md @@ -0,0 +1,36 @@ +# Create Listing Of All Middleman Pages + +Middleman is a handy tool for quickly throwing together a bunch of static +pages with layout and templating help at the ready. Once you have a handful +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 +provided by Middleman. + +```ruby + +``` + +The `sitemap.resources` variable will contain a list of all the resources +that get processed and served by the Middleman app. The `link_to` helper +makes it easy to turn those into links. + +Because `resources` includes images and other assets, you may want to filter +down to just `html` files which could look something like the following: + +```ruby + +``` + +Just add the snippet to whatever page you'd like the page listing to appear +on.