Flesh out page structure

This commit is contained in:
heyarne 2021-07-29 21:53:42 +02:00
commit 85e79a8090
5 changed files with 105 additions and 25 deletions

13
utils.janet Normal file
View file

@ -0,0 +1,13 @@
(defn slugify-content
```
Converts a path from the content folder into the path of the rendered html.
```
[site &opt item]
(when item
(let [parts (string/split "/" (item :path))
file (last parts)]
(string/join [;(slice parts 1 -2) (string (first (string/split "." file)) ".html")] "/"))))
(comment
(slugify-content {} "content/posts/2021-07-07--let-there-be-light.md"))