satelito

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

commit 04bb0fd45d9f568417d5bfe8a414c4f8c2933edf
parent 39add6e17fc7677207f3c75fd5922ee462b2bf2c
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Thu,  4 Feb 2021 16:53:21 -0500

Add an os.execute to remove the .git folder from the satelito-sample

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

diff --git a/satelito/init.lua b/satelito/init.lua @@ -1,28 +1,9 @@ #!/usr/bin/env lua ---[[ - *satelito* is a static site generator in lua. Even the [meta]data are in lua table. - - You can pipe (stdin) filepaths to it or you can pass a filepath as an argument or you can call it as a module. - - It's standalone, so you don't have to install anything to your computer. - The couple dependencies are in the `lib/` folder. - - But some conventions prevails - -- Page who's listed other pages must be named index.md. - -- The path of Templates folder must be in the config.lua - - satelito don't deal with any preprocessing static content like Sass but you can do it: - -- with SassC et entr in a simple shell script ... or pick your favorite libSass flavor. - - It's a only lua and markdown - * Site Metadatas => lua - * Page HTML - ** Content in markdown => HTML - ** Metadatas in lua only - ** Template with etlua ---]] - +-- local argparse = require 'argparse' local assets = require 'satelito.assets' local feed = require 'satelito.feed' local file = require 'satelito.file' -local inspect = require 'inspect' local page = require 'satelito.page' local parser = argparse() :require_command(false) @@ -47,6 +28,7 @@ if args['init'] then os.execute('mkdir ~/satelito-sample') os.execute('git clone git://soucy.cc/satelito-sample.git ~/satelito-sample') print('--------------------------------------------------------------------------------------------') + os.execute('rm -Rf ~/satelito-sample/.git') os.execute('ls -la ~/satelito-sample') print('--------------------------------------------------------------------------------------------') print('You shoul rename `~/satelito-sample` and edit `~/sample/config.lua` according to your needs.') @@ -63,10 +45,12 @@ if args['file'] and file.is_markdown(args['file']) then else print(html) end + + return end if args['pipeline'] then - print('Enter a filepath:') + -- print('Enter a filepath:') -- for filepath in (io.lines()) do if file.is_markdown(filepath) then