June Web Updates

When you don't know what you're doing

I have spent the last 3 days doing some tweaking and improvements to the website. Still a long way to go: my code is a little bit messy, there is probably a lot of duplicated code and the naming convention could be better.

1. Consolidated the categories in one

Before I had four different categories blog, games, movies and books. I have simplified that by using only one main category: blog, all the other ones are indexed withing the blog section as sub-categories.

2. Improved directory structure

I didn't think about it when I first started coding the website, but now that I'm adding content it's important to be able to add content easily. This is it at the moment:

      website/
        ├── blog/
        │   ├── index.html
        │   ├── year/
        │   ├──── month/
        │   ├────── post/
        │   ├──────── images/
        │   └──────── index.html
        ├── css/
        ├── images/
        └── index.html
        

Each post has its own folder (and index.html), that way the url can be accessed without the .html extension. It also has its own images directory, it comes handy to keep things separated.

3. Removed all the <br> tags

Novice mistake. I was using it all over the place in my paragraphs and it shouldn't be used. Best way is creating a new paragraph and define spacing in CSS.

4. Favicon for all devices

Still need to design my own favicon, but decided to check how it works using a temporary one and to be honest, it's a mess, each platform uses a different resolution. Thankfully there are websites like this one that generate everything for you (images and html code).

5. Loading fonts from HTML with <link> instead of using @import from CSS

Another novice mistake. I was importing the fonts from the CSS file and it's considered a bad practice. Explanation here.

6. Started using Neocities CLI

The Neocities CLI is amazing. I prefer command line rather than visual interfaces so this is a blessing. It's pretty easy to use, and you can even update your whole site with just one command.

7. Backup your stuff

Shit happens. Hard drives stop working. Humans make mistakes. I'm now using GitHub to backup my code.