Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Last active December 30, 2015 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuya-matsushima/7892173 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/7892173 to your computer and use it in GitHub Desktop.
$ current_resource.path // => "index.html"
$ current_resource.destination_path // => "index.html"
$ current_resource.source_file // => "/path/to/dir/middleman-guides/source/index.html.erb"
$ current_resource.url // => "/"
$ current_resource.ext // => ".html"
$ current_resource.data // => {"layout"=>"layout"}
$ current_resource.data.layout // => "layout"
$ sitemap.resources.select { |page| page.destination_path =~ /\.html/ }.each do |page|
$ puts page.destination_path
$ end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment