Hey! I see you have stumbled upon my blog… I just finished making it as I write this post, let me tell you how it works!
So, in true Seshan fashion, and since I made the great decision to run this website on Windows Server 2003, I decided to write the blog “software” in ASP. And yes, that’s Classic ASP with VBScript, none of this fancy so called ASP.NET around here (actually it’s because ASP.NET wasn’t cooperating)!
The blog is actually really simple, basically I have a blog folder which contains a bunch of files numbered starting from 0 (that is the post ID) containing the post content. Then, there is a subfolder called meta with files of identical names to the blog folder that contain the post title.
The Default.asp file (the one you are reading this post from) is where things get interesting. The static part is just some HTML and CSS (Materialize). The ASP/VBScript part does the following (simplified).
- Loop through each file in the blog folder, store it’s contents in an array
- The array size starts at zero, but is expanded using “REDIM” to a size of “postCount” (a variable that increases with each loop, i.e each post.)
- Loop from postCount to zero (since postCount is the id of the latest post)
- Write the contents of the post aswell as the post title to the page (in a Materialize collapsible)
- Done! It’s not very complicated…
So yea, it’s nothing too impressive. I might expand it with more features later. Want RSS? Too bad, though if i’m bored then maybe…
That’s it for now!