Introduction
Hello world! Welcome to my blog, I hope you enjoy your stay. It’s pretty bare bones at the moment but I hope to keep expanding it and adding more content.
I am creating this blog for a few reasons
- To learn something new and have an ongoing fun project
- Practice and improve skills such as git
- I am not a developer so I mostly use git for gitops and such in my home lab
- Documentation of the many parts and pieces that make up my home lab
- This will force me to actually document what I’ve done to set everything up and will hopefully save me some headaches in the future when something breaks and I don’t remember how it works
- This will also help me improve my technical documentation and writing skills
- I have been helped many times by random blog posts outlining the issues I’m facing and how to fix them and I hope some of these posts can do the same for others
- A place to store and share my various ramblings
As an introduction, I figured I would explain how I am running this blog. I am using Astro, the Astro Modular theme, Obsidian, a self-hosted instance of Forgejo, and Netlify.
Astro
Astro is a static site generator that runs on Javascript and focuses on making fast and responsive sites. It allows you to pick between many community developed themes for your site, then simply edit some text files to create your posts. I’m sure there is a lot more to it than that but for my purposes that is enough.
To use Astro you simply need to install Node.js, which is out of scope of this post.
There are a few other popular static site generators such as Hugo and Jeykl that I also looked into. Hugo uses Go and Jeykl uses Ruby, and I preferred the idea of using Javascript (again, not a developer so don’t pay any attention to my preferences here). But the main reason I went with Astro was because I found the Astro Modular theme.
Astro Modular
Astro Modular is a theme that allows you to use the Obsidian note taking app to edit your Astro site. It looks great and since I already use Obsidian for note taking and studying, it was the perfect fit.
The theme is very simple to set up, you simply open a terminal and run
npm create astro@latest -- --template davidvkimball/astro-modular
in the location you want to create the folder. The Astro wizard will prompt you a couple of times and install everything you need.
After that you simply open Obsidian and open the src/content folder as a vault. Obsidian will ask you if you trust the author, click yes and it will install all of the plugins for the theme that allows you to edit your site from within Obsidian. A setup wizard will then open and run you through the options for customizing your site (you can run it again at any time from the Astro Modular Settings plugin).
That’s it, just like that you have a site set up and ready for you to make your own. Huge shout out to the author of the theme and all the effort he has put in to making the theme so user-friendly.
Obsidian
Obsidian is a free note-taking app that lets you write your notes in Markdown format with all the benefits that brings. It has added features like linking to other notes and a graph view to visualize all the connections you’ve made. It’s amazing once you really get into it and put some time in. There are also thousands of community developed plugins you can use to enhance and personalize your experience.
Obsidian stores all your files locally on your device, no cloud storage required, or even offered. For a privacy conscious (i.e. paranoid ) person like myself, this is perfect. The only cost to Obsidian is if you want to sync your notes between devices. Though I use the Obsidian Livesync Plugin that involves a self-hosted database to sync instead (this is probably a blog post for another time).
Forgejo
After editing the files for my blog, I use git to push my changes to the repo on my self-hosted instance of Forgejo (another blog post for another time). Forgejo is a software to host and manage git repositories, similar in function to Github. I use my instance of Forgejo instead of Github for privacy reasons. Wherever possible I prefer to keep my files on my servers and not on the cloud of a company I can’t trust.
Netlify
Netlify is a service that allows you to deploy sites with git through their CDN, making it perfect for my purposes. Again, there are similar services and I’m sure Netlify can do more than that, but that is all I need from it. I set up my domain in Netlify, allowing them to deploy new content to it automatically whenever I push a commit it my Forgejo instance.
Netlify has an automated pull service for popular code repository sites such as Github, Gitlab, and Bitbucket. Unfortunately they do not have a way to directly connect my Forgejo instance. For a while I tried to find an actions workflowthat I could adapt to use with Forgejo but I wasn’t able to get anything to work. Luckily, I discovered that I could use webhooks in my Forgejo repo to automatically pull from Netlify every time I made a commit (yet again, a blog post for another time).
Well there we go, my first blog post is in the bag. I’m excited to develop this project further and I hope that it can be of use to someone.