diff --git a/.gitignore b/.gitignore index 9f9192a..0df74c6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /src /static /out +/gopher diff --git a/genall.sh b/genall.sh index 0d1781e..0fcd0d1 100755 --- a/genall.sh +++ b/genall.sh @@ -5,4 +5,5 @@ ./home.lua ./genrss.lua ./gengopher.lua +./gopherblog.lua ./gopher-home.lua diff --git a/genpages.lua b/genpages.lua index e4edec1..4746b1e 100755 --- a/genpages.lua +++ b/genpages.lua @@ -3,7 +3,7 @@ local sitelib = require "sitelib" local fs = require "lfs" print("Copying static content...") -os.execute("cp -rv static/* out/") +os.execute("rsync -avzh --delete static/* out/") print("Building list of markdown files") local mdfiles = {} diff --git a/gopherblog.lua b/gopherblog.lua index d0f0b15..30e3be9 100755 --- a/gopherblog.lua +++ b/gopherblog.lua @@ -29,7 +29,7 @@ for k,infile in ipairs(mdfiles) do local page = sitelib.parsepage(c) if page.date then page.title = string.format("%s (%s)",page.title,page.date) end local fline = page.md:match("\n\n(.-)\n") - index = string.format("0%s\t%s\t%s\t%d\ni%s\n%s",page.title,fpath,sitelib.hostname,sitelib.gopherport,fline,index) + index = string.format("0%s\t%s\t%s\t%d\ni%s\ni\n%s",page.title,fpath,sitelib.hostname,sitelib.gopherport,fline,index) end index=sitelib.gheader .. index .. sitelib.gfooter diff --git a/tags.lua b/tags.lua index 5cfb55d..1fe0462 100755 --- a/tags.lua +++ b/tags.lua @@ -52,3 +52,23 @@ for tag,v in pairs(tags) do f:write(sitelib.footer) f:close() end + +print("Writing overall tag index...") +local ti = {} +for tag, v in pairs(tags) do + ti[#ti+1] = tag +end +table.sort(ti) +local f = io.open(sitelib.outpath.."/tag/index.html","wb") +f:write("