Browse files

added new 'filename' metadata that contains the original name of a post

  • Loading branch information...
1 parent 798590c commit e8844e638162631143667584926029fcbfc51428 @terhechte committed Aug 25, 2015
Showing with 2 additions and 0 deletions.
  1. +1 −0
  2. +1 −0 src/static/core.clj
@@ -324,6 +324,7 @@ Posts are Maps with the following attributes:
- footnotes: If you're using Markdown and defining footnotes, they'll be made available in here.
- date: A string with the date when this post was created
- javadate: A java date object in case you want to perform date manipulations
+- filename: The original filename of the rendered post, without the folder path (i.e."")
- keywords: A string, the list of keywords of this post "a b c"
- keyword-keywords: The keywords of this post as a vector of keywords [:a :b :c]
@@ -132,6 +132,7 @@
{:title (:title metadata)
:content @content
:url url
+ :filename (FilenameUtils/getName (str f))
:date date
:javadate (javadate-from-file f)
:footnotes (:footnotes metadata)

0 comments on commit e8844e6

Please sign in to comment.