| paulcapewell.com
| Another update (230207)
Posted on 07 February 2023

The latest situation is this: I have copied over all the posts from my old Wordpress blog. They live at a slightly different URL, but using a neat little .htaccess trick, I think that any links to the old posts now seamlessly redirect to the new ones.

The biggest two problems are: images are all broken; and the layout isn't ideal yet.

Images: I have saved all the images, but somewhere in the conversion process (I used this tool to convert my Wordpress export to markdown), I completely fucked all the image links. I initially thought it was just a folder-related issue, but I think some combination of how Wordpress stores images (multiple scaled versions) and how the aforementioned tool scrapes images, potentially renaming them, has broken a lot of the links in a weird way. Bottom line: this is not a priority for me. The content of the old posts stil loads, and if I have the energy to go through and manually fix images on some of the more 'important' posts, I might.

Layout: I'm trying to build this website literally from scratch, adding lines of code manually to see what works. I'll either google what I want t achieve and paste a line in, or I'll look at a website that inspires me, dig into the code and try and understand which bits of code (or, more likely, CSS) I need to use to achieve it. It's how I first learned to code in HTML in 2002, and twenty years later, it's still how I like to do it.

For the time being, it's a very basic layout. The biggest problem is it's not very(?) responsive. I like responsive websites. I learned about them on my university course in 2010 or so. I just need to remind myself what the 2023 best practices are. Fortunately for such a simple, mostly text-based website, it won't be too hard.

On a more fundamentallevel, I've now got the bare essentials working. But my eleventy setup is clunky in two places.

The environment: I'm running my eleventy setup in Windows 10, using the Windows Subsystem for Linux. This works really well because a lot of this stuff is linux command-line based stuff, and I have the flexibility to move files around in File Explorer (when permissions allow me to, at least). I currently use Notepad.exe to write everything, but I want to try Visual Basic Code or whatever it's called as it worked nicely when I tried it in the past - a built in file management, editor and terminal system, with syntax highlighting and shortcuts. But my environment is 'stuck' on this one machine. That makes it less flexible, and also makes me nervous. I don't want to hose this install. I'd like to create a backup, and ideally make it portable somehow.

I have a Chromebook which also has a linux subsystem, and that would be my ideal work environment for this project. But my Chromebook is getting quite old, and it has an issue where, in sleep mode, it just crashes. So quite often I'll open it and it'll be booting from scratch, reporting a crash. It does try to rebuild the last session, but it all feels a bit delicate for running stuff like eleventy. Again: I don't want to completely mess up something I've painstakingly created so far.

The upload process: Currently, when I make edits to the src folder, and save them, eleventy cleverly saves the new/edited files in the public folder instantly. This creates a fully-functional local version of the website for testing. I love this - browsersync feels magic, and it reminds me of using WYSIWYG web editors like Frontpage Express all those years ago. But so far, that's it - and to upload my website to my hosting, I'm using Filezilla for FTP, and just dragging the new copy of the public folder over to the web space. But I know there are better ways - some using tools like rsync or SFTP, or others which use third parties like Netlify and Github. The latter seem unnecessarily clunky and middlemanish. Why would I used a third party host to upload my website when I have my own hosting? What happens if those services go away or start charging? It seems an unnecessary step - aside from the fact they seem designed exactly for these sorts of tasks. So maybe I'll bite the bullet and use git or something. Ideally if I can run that side of things entirely in the command line as well, it will be quite nice.

And finally, once the basic website is 'done' (lol), my main needs will be to add new blog entries. This will involve creating the relevant markdown file, and perhaps adding an image or two. I don't have much practice of doing that yet, so things like creating the front matter in this markdown file for this entry, I had to copy over from an old one. I'll have to see if there's an obvious way to automate that. Maybe some of the code editors have built-in shortcuts for that. And I suspect once I've sorted out image passthrough, I'll be able to drop an image into the src folder and it will whisk its way to the appropriate place in the public folder. But how will I link to to it while writing the markdown? And where should the image live?

This latter point brings me to another area of anxiety: the folder structure. At the moment, all my blog entries live under blogs and then each entry has its own folder, inside of which is an index.md file. This seems weird to me but I'm not very experienced. I feel like I'd prefer all entries to live in a blogs folder, with a single images folder in there, holding all images. But I don't know what the best practices are, and I worry that I'll go too far down one avenue and realise too late that I've made life difficult for myself.

But such is life, and this is all why I'm bothering to tinker with this stuff anyway: it's fun to learn new skills.