ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit b73b870816f95440917736de044052afb141a52e
parent 3db0213e7e386a0a4c7f603b27b943f85355da68
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat, 20 Jan 2018 13:21:42 -0500

Remove the shorturl function.

Diffstat:
Mfunctions/ferron-utils.lua | 32--------------------------------
1 file changed, 0 insertions(+), 32 deletions(-)

diff --git a/functions/ferron-utils.lua b/functions/ferron-utils.lua @@ -9,36 +9,4 @@ function ferronutils.sethtmlpath(folder) return Ferron.site.path .. Ferron.site.config.SITE.PATHS.HTML .. folder end -function ferronutils.shorturl() - -- ShortURL <https://github.com/delight-im/ShortURL/blob/master/JavaScript/ShortURL.js> - local alphabet = "23456789bcdfghjkmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ-_" - local base = alphabet:len() - - local function encode(num) - local str = "" - - while num > 0 do - str = string.char(num % base) + str; - num = math.floor(num / base); - end - - print(str) - - return str - end - - - local function decode() - print("Decode!!", base) - end - - if f == "encode" then - return encode(p) - elseif f == "decode" then - return decode(p) - else - return encode(p) - end -end - return ferronutils