Building this site with Lua
Why generating my site html code and pages with lua? because I can. Or better said, because I wanted to try this out. I've been using Lua in the lasts months and really got fond of it. It started with löve, then LuaAV, and now pure Lua for scripting. It's really easy and I like it a lot. Lua ALL the things!
The first problem I encountered was: how do I make it easy to use? I don't know. At first I wanted to put a file with text and the script should do the rest (creation date of the file, modification date, extract title from filename, etc...) but then I decided to make every post in lua 'code' too. Well, more like a little lua table which will be read and interpreted, so, this way I can put also some other metadata I might use in the future. Like what? like a link, embedd a video or audio player, put some formatted code, etc... So the structure for every post is as follows:
{ Date="YYYYMMDD_HHMM",Title="",Content="",Meta="",Link="",Audio="", Video="", Code="" }
Now the Date, Title and Content are implemented. The rest should be integrated when I find nice code or audio / video players to embed in my site. I might have to check out how do I display code, or just upload the file and link it here... maybe also some kind of shortcut for links, like in org mode, so I don't have to write html code in my posts.
I have plans to put this on github in the near future, but as I already mentioned in my first post, still have a lot to do to make it flexible for people who are not me.
For now, I will try to catch on some stuff I've been wanted to post since my chyrp blog died some weeks ago. That's the nice thing about building my site with lua and with this file per post structure, if the databe or something breaks, I still can re-read the posts and use them with another template or cover to pure text files.