Seshan's Blogkeyboard_backspaceBack to Posts
November 12, 2018
May 2019 Update: This blog post was the first post on my old, custom blog system. Now that I got bored of it, we have a new blog systems.
Just keep in mind that this post no longer reflects how the blog works nowadays.
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).
- 1. 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.)
- 2. 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)
- 3. 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!