template blog index

This commit is contained in:
2022-10-12 16:58:44 -06:00
parent 610da9079e
commit 07dd08698c
6 changed files with 32 additions and 48 deletions

View File

@@ -0,0 +1,17 @@
let render ~posts =
let open Database in
<div>
<h3>Blog</h3>
I have an <a href="/blog/rss.xml">RSS feed</a> too.
<br>
</div>
% posts |> List.iter begin fun (post : Blog_post.t) ->
<div class="link-wrapper">
<a href="/blog/<%s post.slug %>">
<%s post.title %>
</a>
<i>
<%s post.date %>
</i>
</div>
% end;