lib/octopress/page.rb in octopress-3.0.10 vs lib/octopress/page.rb in octopress-3.0.11

- old
+ new

@@ -198,9 +198,15 @@ end def date_slug @options['date'].split('T')[0] end + + # Returns a slug extracted from a path + # + def path_slug(path) + File.basename(path, '.*').scan(/((\d+-){3})?(\S+)/).flatten[2] + end # Returns a string which is url compatible. # def title_slug value = (@options['slug'] || @options['title']).downcase