@@ -135,7 +135,7 @@ local function build_index(pages, posts, templates)
135135 -- Reset & close f
136136 count = 0
137137 output = ' '
138- if config . print then print (' \t index ' .. index ) end
138+ print (' \t index ' .. index )
139139 index = index + 1
140140 end
141141 end
@@ -150,7 +150,7 @@ local function build_rss(posts, templates)
150150 return
151151 end
152152
153- if config . print then print (' [7] Building RSS' ) end
153+ print (' [7] Building RSS' )
154154 local rssposts = {}
155155
156156 for k , post in ipairs (posts ) do
@@ -190,18 +190,18 @@ local function build()
190190 template :set (' config' , config )
191191
192192 -- Load template files
193- if config . print then print (' [1] Loading templates' ) end
193+ print (' [1] Loading templates' )
194194 local templates = util .load_templates ()
195195
196196 -- Load the posts and sort by timestamp
197- if config . print then print (' [2] Loading posts' ) end
197+ print (' [2] Loading posts' )
198198 local posts = util .load_markdowns (' posts' , ' post' )
199199 table.sort (posts , function (a , b )
200200 return tonumber (a .time ) > tonumber (b .time )
201201 end )
202202
203203 -- Load the pages and sort by order
204- if config . print then print (' [3] Loading pages' ) end
204+ print (' [3] Loading pages' )
205205 local pages = util .load_markdowns (' pages' , ' page' )
206206 table.sort (pages , function (a , b )
207207 return (tonumber (a .order ) or 0 ) < (tonumber (b .order ) or 0 )
@@ -229,7 +229,7 @@ local function build()
229229 template :set (' have_posts' , # posts > 0 )
230230
231231 -- Build the posts
232- if config . print then print (' [4] Building ' .. (config .cache and ' new ' or ' ' ) .. ' posts' ) end
232+ print (' [4] Building ' .. (config .cache and ' new ' or ' ' ) .. ' posts' )
233233 template :set (' single' , true )
234234 -- Page links shared between all posts
235235 template :set (' page_links' , util .page_links (pages , nil ))
@@ -243,7 +243,7 @@ local function build()
243243 end
244244
245245 -- Build the pages
246- if config . print then print (' [5] Building ' .. (config .cache and ' new ' or ' ' ) .. ' pages' ) end
246+ print (' [5] Building ' .. (config .cache and ' new ' or ' ' ) .. ' pages' )
247247 template :set (' single' , false )
248248
249249 for _ , page in ipairs (pages ) do
@@ -259,7 +259,7 @@ local function build()
259259 template :set (' page' , false )
260260
261261 -- Build the indexes
262- if config . print then print (' [6] Building index pages' ) end
262+ print (' [6] Building index pages' )
263263 -- Page links shared between all indexes
264264 template :set (' page_links' , util .page_links (pages , nil ))
265265
@@ -270,7 +270,7 @@ local function build()
270270 build_rss (posts , templates )
271271
272272 -- Copy inc directories
273- if config . print then print (' [8] Copying inc files' ) end
273+ print (' [8] Copying inc files' )
274274 util .copy_dir (config .root .. ' /inc/' , config .root .. ' /' .. config .build_dir .. ' /inc/' )
275275 util .copy_dir (
276276 config .root .. ' /templates/' .. config .template .. ' /inc/' ,
0 commit comments