satelito

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

commit 39aba9701db3493f079f1ffd7cdf28e27ba42edc
parent 7840e618e315c8f074f3bd20f1174358465aecbe
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue, 29 Nov 2022 20:23:08 -0500

Remove what is not needed anymore

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

diff --git a/satelito/init.lua b/satelito/init.lua @@ -117,26 +117,12 @@ end -- Pipe stdout into satelito -- Example: '$ find site/content/ | satelito pipe' if args['pipe'] then - local contentdir = _G.Satelito.contentdir local sitedata = {} for filepath in (io.lines()) do if file.is_content(filepath) then -- Get the pagedata of the file local pagedata = model.set(filepath) - local collection_data = {} - - -- - -- List - -- - - -- Collection - -- Get the files of a collection (only for the pipe command) - if pagedata.collection and pagedata.collection_list then - for i = 1, #pagedata.collection_list do - collection_data[#collection_data+1] = model.set(contentdir..pagedata.collection_list[i]) - end - end -- Add the pagedata of the file into the sitedata table if lume.count(sitedata) == 0 then @@ -144,28 +130,12 @@ if args['pipe'] then end sitedata[#sitedata+1] = pagedata - lume.extend(sitedata, collection_data) end end - if lume.count(sitedata) == 1 and file.is_index(sitedata[1].path) then - print([[ - WARNING! - - The only page your about to build is an index page. In this case - you better to pipe the folder if this page is a list for other - pages. - - Otherwise some of your content might be missing. - ]]) - end - print('=> '..lume.count(sitedata)..' content found') print('=> Making the web site ...') - local count_test = lume.count(lume.unique(sitedata)) - print(count_test) - -- Sorting by alphanum table.sort(lume.unique(sitedata), function(a, b) return a.idorder > b.idorder end)