Revamped Blog, powered by Svelte
First off, congrats to the Svelte team on getting Sveltekit to 1.0! š
I wanted to write a quick piece about my blog migration. Iām currently writing a longer, broader piece about my digital migration.
tl;dr, data sovereignty and data preservation are very important and I donāt want to be locked into a platform. Iāll put into practice a concept from the IndieWeb community: POSSE ā Publish Own Site Syndicate Elsewhere. I will first post my content on here then Iāll likely take a snippet of it and post it on a bigger platform (e.g. my Medium page) to point it back to my own blog.
Iāve finally bit the bullet to host my own blog instead of using a service. Iāve used Sveltekit to build my site. Many thanks to Josh Collinsworth for his blog post on how to build a static Markdown blog from scratch using Sveltekit. The blog post is super insightful with great hand-holding which was exactly what I needed to get it done!
Also, special shoutout to Hamilton for putting me onto the world of Svelte.
Framework: Sveltekit
My old site was built using a ajlknās HTML5 UP template (TY!). First I wanted to get it to parity with my old site in terms of look and feel, then I began moving my blog over.
I followed along with Joshās blog post and downloaded the associated starter kit.
Blog Migration: medium2md
Getting the content from my old blog was a bit of a bear to deal with. I first exported my data from Medium, which comes as a zip file containing a bunch of things, but most importantly the blog pieces. These are saved as html files, but upon inspection, you quickly realize the images arenāt downloaded with the content. I used medium2md to convert the html to markdown. It also has the added benefit of downloaded the referenced images from Mediumās CDN.
Then I made adjustments to the front-matter and referenced the images to static folder directory to host them. The imagesā title has a hash representation; I changed some of filenames but got lazy so š¤·š¾āāļø. However, I do need to go back and add alt text the image to ensure accessibility.
Note: Iām also thinking through how I want to deal with images more broadly. The PublicAlbum project has given me some ideas of how I might want to deduplicate some of the work, especially for blog pieces like 2018-travel-in-review but thatāll likely be for another time.
UI Components: Svelte Material UI
I wanted to get some basic things on the website up and running fast so I just looked for an existing component library and stumbled upon Svelte Material UI. I like it, itās working well-enough, and it allows for me to get to feature parity of my old site.
Iāll likely begin looking into building my own components once I have an understanding of how I want my content to show up on my site. Iām learning a bit about it now and things like Storybook and Histoire are starting to make sense.
Host: Netlify
Iām deploying using Netlify. I could have made a GitHub action to build the files then host those directly on GitHub Pages, but it was easier to host the site on Netlify and it gives me the flexibility to expand my websiteās functionality in the future.
Comments: Giscus
The commenting is powered by Giscus. Initially, I had Utterances, but then I saw that Russ Poldrackās blog used Giscus and did some digging and I decided that using GitHub Discussions is more appropriate and attractive than using GitHub Issues and saw that Giscus is currently active so I went with that one.
Analytics: Plausible
I used to have Google Analytics powering my old site, but I rarely checked it. I saw that the GA Universal Analytics I had on my site needed to be switched over to GA4 property. I didnāt know what any of that meant. All I was really interested in was simple metrics like how many visits did my site get? And now since I ported over my blog, it would be nice to see how many people read a given blog post and perhaps how they found their way to my site.
I looked to see what the options were out there. It seems like the two main GA alternatives that were privacy-compliant were Plausible and Fathom. I did a cursory search and read this blog post that gave me the lay of the land. I saw that the Pyodide blog used Plausible, it was also the cheaper option, so I just went with that one.
Public Repo
I decided to use the special repo username/username
to host my site for two main reasons (Twitter š§µ for original inspiration):
(1) it contained my README file and really didnāt want to make two repos that referenced the same file and a submodule would have been overkill
(2) I use a custom name for my website and also Iām deploying it with Netlify so I didnāt really need the username.github.io
repo
Final Thoughts
All of this has been in preparation for a challenge I made to myself, one that Iāve made several times before and have failed spectacularly, but THIS time Iām going to do it: Iām going to write (also Iām going to learn and build new things).
The plan is to publish at least one blog post a week, typically on Wednesdays. It can be on anything, itāll likely be on some personal projects Iāve been trying to get out the door forever. This blog migration is one of those so at least I can check that one off the list ā
Back in October, I was laid off from a startup I recently joined and found myself in a position Iāve never been in: I currently have no external responsibilities (no debt, no kids, no one who depends on me), I have lots free time because of the whole no job situation, I do have some savings, and I have tons of ideas.
Itās daunting, Iāve been going full-steam ahead for the last 17 years: 4 years as an undergrad, 2 years working as a research lab manager, 5 years doing a PhD, a year as a postdoc, 4.5 years at Mozilla, 5 months at the startup, all without a real break in between. I want to take advantage of this opportunity. Iāve wavered back and forth on how long I will give myself to do this. Maybe 6 months? maybe a year? Iām also taking this as a chance to figure out exactly what I want to do next.
I have another post Iām working on (you should see the number of drafts I have in queue š š¬š«£) that Iāll link here from a recent cross-country train trip I did that coincidentally started the same day I was let go. A deeper dive into figuring my life out.
Letās wrap this up:
- Svelte is really cool š
- Itās fun playground thatāll allow for me to tinker š
- This website will likely host a lot of the ideas Iām prototyping so STAY TUNED! šØš¾āš¬