Skip to content

Commit

Permalink
Field url was added to content objects of type post and page.
Browse files Browse the repository at this point in the history
It contains a full URL of the page and can be used as canonical URL in templates.
  • Loading branch information
svetlyak40wt committed May 27, 2024
1 parent 93984c5 commit baf3f48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"ASDF"
"REPL"
"HTTP"))
(0.3.0 2024-05-27
"* Field `url` was added to `content` objects of type `post` and `page`. It contains a full URL of the page and can be used as `canonical` URL in templates.")
(0.2.0 2024-05-26
"* `Excerpt` field was added to the `content` objects such as posts and pages. It can be used in the description HTML tags.
* Filters `remove-html-tags` and `first-line` were added to the template engine base on Closure Templates.")
Expand Down
2 changes: 2 additions & 0 deletions src/content.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@
(defmethod template-vars ((site site) (content content-from-file) &key (hash (dict)))
(setf (gethash "title" hash)
(content-title content)
(gethash "url" hash)
(object-url site content :full t)
(gethash "html" hash)
(content-html content)
(gethash "excerpt" hash)
Expand Down

0 comments on commit baf3f48

Please sign in to comment.