About Social Code
summaryrefslogtreecommitdiff
path: root/tools/front_page.lua
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@gmail.com>2023-01-20 22:58:09 -0500
committerLucas Fryzek <lucas.fryzek@gmail.com>2023-01-20 22:58:09 -0500
commitcb205d1c4bf42f5c2e25cef6e7884853c86de056 (patch)
treed63a8cdc01d22bb2af5d58739fba24e4b803187c /tools/front_page.lua
parent75b3b6a4785b91909de7e06d2b729e43c1daeb59 (diff)
Add RSS feed
Diffstat (limited to 'tools/front_page.lua')
-rw-r--r--tools/front_page.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/front_page.lua b/tools/front_page.lua
index 9557a53..6a7cf4d 100644
--- a/tools/front_page.lua
+++ b/tools/front_page.lua
@@ -36,7 +36,11 @@ function Pandoc(doc)
local header = pandoc.Header(2, note.title)
table.insert(out_list, header)
- table.insert(out_list, pandoc.Para(string.format("%s...", note.preview)))
+ if note["cover_image"] == nil then
+ table.insert(out_list, pandoc.Para(string.format("%s...", note.long_preview)))
+ else
+ table.insert(out_list, pandoc.Para(string.format("%s...", note.preview)))
+ end
local out = pandoc.MetaBlocks(out_list)
output:insert(pandoc.MetaMap({link=string.format("/notes/%s.html", note.note_name), note=out}))