Today I wanted to take a break from coding so I decided to focus on the organization and navigation of my blog. I added pages because I had it in the back of my mind and I have a friend that reads who suggested it. I was going to do it for entry 2 but the thought of writing the extension excited me so much I focused on that instead. This seems to have worked out better because with 3 pages I was able to create navigation on entry 2 that I'm happy with and I have an easy pattern I can follow to create more pages. I can envision this pattern scaling for as long as I need it to. Well, until I have 1000 pages and the default sort order in my file explorer doesn't match up with the order of my entries but I'm confident that problem won't exist long before I hit 1000 entries so it's not worth thinking about.
The homepage contains links to every entry and there's a navigation link on top to go to the newest entry. On each entry there's a home link. If it's applicable there's also optional next and previous entry links. I also updated the date in my headings text and used the <time> element to encode the date, time, and timezone so I don't lose that information. That little bit of extra work allowed me to clean up the page and remove the rendering of the timezone without using CSS yet.
Behind the scenes, I've added some meta elements for charset and author. I also organized my entries into an entries folder starting with 001 to make my update process easier.
Some decisions I made deliberately to make refactoring using search/replace easy and to force myself how to think about building this blog piece by piece.
Another decision I made that made my life easier was using relative links. I wanted to use absolute links, but it made my process more difficult and impossible to debug locally. Also, after some research it seems like relative links are better for web crawlers.
I'm also trying to use html as semantically as possible. Some examples of this is using tags like <code>, <nav>, and <time>. Part of this is because when I start getting into templatizing my website, I'll be able to write the parser myself and it should be as straightforward as possible. This also makes refactoring through search/replace easier.
One thing I know about myself is that I work best when I have well-defined structure that I can focus on. I'm no good at creating the structure for myself, but once I have it I can follow any process almost robotically. I can live with inefficiency as long as there's a well-defined structure to it. If there's an ill-definied inefficiency which makes mistakes easy to make I'll seek out a solution to reduce the potential for mistakes.
The pattern I have for creating a new blog page is mostly well-defined and works for me right now, but it does have some inefficiencies that can result in mistakes. Those will probably be the first things I fix. The process is:
<li> to the index.html by copying the last <li>href in the new <li> as well as the entry number, date, and title<h1> for the new entrynew Date(), and put it in index.html and the newly created entryBy writing out the instructions here it helped me refine the process. I'm going to try to finish the reload plugin and follow this process to a T tomorrow when I create the blog post. I'm going to note any inefficiencies or mistakes I made, and work on those next. That thinking of processes is directly inspired from a book called The Phoenix Project. The Phoenix Project is about applying the theory of constaints to devops. I could write a whole other post on how much I love that book. The Phoenix Project is based on another book, The Goal, which is a management oriented book I might find time to read someday.
I hope one thing this blog does is help me set goals and give me a greater ability to create my own structure.