Date:
Having a five or six-page static site is one thing and having a personal
blog on HTML is totally different. My deepest respect for those who are
still running their blogs on HTML. I moved this site thinking it would
be easy and would be great to have one site with old school look and
feel but when I am doing all the backend work I am now finding it is not
easy. Even copying one code to another file doesn't work as it does.
Moving a few files to the VM is very easy I use
FileZilla
to do that but the difficult part is the arrangement of files and
folders.
I thought I would just dump all the files in one location and images in
one folder and here the site is ready. No that is not how it works now I
find out, every folder adds up to the URL. For example, I am writing
about HTML so this is a technology blog post. If I put this file in the
folder named Post then my URL would be
(https://shaanchopra.net/post/moving-to-html-and-file-arrangement-plan)
if move this file to the folder named Technology then it will give out
the correct location. So, I am ending up having multiple folders with
different categories.
Not to forget every folder will also be linked differently inside the
blog and category page. To understand this one need to understand the
hierarchy level of files and folders on the host. My root according to
me is the folder name HTML all the files and folders go inside this
directory. Inside this, I have my index.html, contact.html and all other
pages that are not blog posts. Then there are the images, categories,
assets and individual category folders so, while linking a file which is
in the categories folder I need to use ../ at the beginning of the file
that needs to be linked is in the individual category level folder.
Exactly after the fifth file, everything becomes so jumbled. No wonder
CMS like WordPress is so famous no one like to keep doing what is
happening on this site. The only way one can survive is to be very clean
in the code and keep a structure. Earlier I used to find comments on the
backend of a web page and I use to think they are useless, now
understand how important they are to the person who coded that web page.
I am almost done with the basic structure of the site, after this, I
will be looking to automate some of the functions and add some useful
scripts.