Skip to content

Commit

Permalink
added new 'filename' metadata that contains the original name of a post
Browse files Browse the repository at this point in the history
  • Loading branch information
terhechte committed Aug 25, 2015
1 parent 798590c commit e8844e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.org
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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. - 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 - date: A string with the date when this post was created
- javadate: A java date object in case you want to perform date manipulations - 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."2015-12-12-jay.md")
- keywords: A string, the list of keywords of this post "a b c" - 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] - keyword-keywords: The keywords of this post as a vector of keywords [:a :b :c]


Expand Down
1 change: 1 addition & 0 deletions src/static/core.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{:title (:title metadata) {:title (:title metadata)
:content @content :content @content
:url url :url url
:filename (FilenameUtils/getName (str f))
:date date :date date
:javadate (javadate-from-file f) :javadate (javadate-from-file f)
:footnotes (:footnotes metadata) :footnotes (:footnotes metadata)
Expand Down

0 comments on commit e8844e6

Please sign in to comment.