~swisschili/blackjack

a32232c4b6c2050ca9ebe6babdc9bd31fcae673c — swissChili 8 months ago f653116
Add nested directory support in content
2 files changed, 5 insertions(+), 3 deletions(-)

M blackjack.lua
A docs/site/CNAME
M blackjack.lua => blackjack.lua +4 -3
@@ 169,8 169,8 @@ local function replaceExtension(file, ext)
  return file:gsub(".%w+$", '.' .. ext)
end

local function getFileName(file)
  return file:match("/([^/]+)$")
local function getFileName(site, file)
  return file:sub(#site.content + 1)
end

function Site:build()


@@ 178,7 178,8 @@ function Site:build()
  for file in p:lines() do
    print(" Building: ".. file)
    local html = self:render(file, {})
    local outFile = self.output .. '/' .. getFileName(
    local outFile = self.output .. getFileName(
      self,
      replaceExtension(file, self.processors[getExtension(file)].extension)
    )
    print("  Writing: " .. outFile)

A docs/site/CNAME => docs/site/CNAME +1 -0
@@ 0,0 1,1 @@
blackjack.swisschili.sh