satelito

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

commit c8d951e18ff555b7e590bb23dd9d26540edcdd49
parent 17f09c8a4d2ad4970f8bccfc869fdddde96a02a2
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Fri,  4 Mar 2022 20:22:19 -0500

Add a is_lua method

Diffstat:
Msatelito/file.lua | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/satelito/file.lua b/satelito/file.lua @@ -104,6 +104,11 @@ function file.is_index(filepath) return (file.get_basename(filepath) == 'index.md') or (file.get_basename(filepath) == 'index.html') end +-- Check if the file is lua +function file.is_lua(filepath) + return (mimetypes.guess(filepath) == 'text/x-lua') +end + function file.get_rellink(filepath, dirname) if file.is_index(filepath) then return '/' .. file.get_dirname(file.get_relpath(filepath, dirname))