diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 1158c044..f26263e3 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -97,7 +97,8 @@ module Jekyll def to_liquid { - "name" => File.basename(name, extname), + "basename" => File.basename(name, extname), + "name" => name, "extname" => extname, "modified_time" => modified_time, "path" => File.join("", relative_path) diff --git a/site/_docs/static_files.md b/site/_docs/static_files.md index df12acf1..19d45089 100644 --- a/site/_docs/static_files.md +++ b/site/_docs/static_files.md @@ -42,7 +42,15 @@ following metadata:
file.name
- The string name of the file without the extension, e.g. image
for image.jpg
+ The string name of the file e.g. image.jpg
for image.jpg
+
+
file.basename
+
+ The string basename of the file e.g. image
for image.jpg