satelito

Static [web] site (or page) generator (ssg) made with Lua script.
git clone git://soucy.cc/satelito.git
Log | Files | Refs | README

commit c46897257208d74acc3c6514ed1ab81e1d992919
parent 6b8158cb503562826d86856ac56989e4e4210016
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Wed,  5 May 2021 20:20:52 -0400

Use discount only if the content is markdown

Diffstat:
Msatelito/model.lua | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/satelito/model.lua b/satelito/model.lua @@ -44,7 +44,11 @@ function model.set(filepath, config, contentdir) pagemeta.id = 'tag:' .. config.siteurl:match('^%w+://([^/]+)') .. ',' .. pagemeta.date .. ':' .. pagemeta.rellink -- HTML content - pagemeta.content = markdown(file.read(filepath)) + if file.is_markdown(filepath) then + pagemeta.content = markdown(file.read(filepath)) + elseif file.is_html(filepath) then + pagemeta.content = file.read(filepath) + end -- List and Feed if file.is_index(filepath) and pagemeta.list ~= false then