My site isn’t anything special, but I thought I’d like to share how I create and host things for others who may be interested in sharing their own words with a very simple and easy to maintain structure.
Motivation for hosting this site
I have hosted a blog site in some form for the past 10+ years. The idea being to share my experience with others and hopefully help others with some of the issues I have come across through my career working for one of the largest MSPs in the world.
Sharing on social media has come more recently, but this site still serves as the main location for all of my content. Even more so in the past few months, social media platforms have shown that they are not a certain thing. Accounts get suspended, ownership changes kill services, rules change, etc. hosting my own site I have total control over the content with no risk of losing anything, which for me is well worthwhile.
Ultimately, I wanted this site to be one place where you can always find my projects, regardless of what other platforms may do. I don’t make any money off my content so keeping it low cost is important. Seeing others lose their work due to account issues or frustration with a platform served as motivation to own my content.
If you are a content creator, I encourage you to keep platform agnostic, allowing you to easily recover if for some reason an account is suspended.
Lets get to the bones of it, this site is built using Jekyll, a Ruby based tool that is able to convert markdown into a static website, for my use case it was the perfect fit.
Here are some of the things that I like about it:
- Small footprint - I used Wordpress for my last site, but found it was massively bloated for my needs. Along with update issues and other administrative overheads. Jekyll being static removes a lot of this complexity.
- Security - Wordpress and its plugins, due to its popularity sees a lot of vulnerabilities exploited. Again another benefit of using a static site generated by Jekyll this risk is significantly reduced.
- CDN Friendly - Having static content means that the site is able to be cached, handling incredible loads at low cost across the globe.
- Simple Format - Using markdown for all of the posts means that the content is pretty easy to move around. They can be used with other frameworks or easily converted to different formats if needed.
- Git Friendly - I hold my entire site in Git, so backups are easy along with the history of any changes.
Jekyll also supports additional features through plugins, like RSS, Sitemaps, metadata, pagination and much more. If there isn’t a plugin to meet your needs its simple to create something.
It’s also incredibly fast at building a site and generates predicable, easy to host results. If you haven’t looked at Jekyll, you might give it a whirl!
Jekyll though needs two things to make it really work:
- A way to build the site
- A place to host the site
Building the site
Building a Jekyll site is easy, you just run
jekyll build, but to make things even easier I utilize GitHub actions to automate the builds and deploy whenever changes happen.
Using actions is pretty simple, the documentation is also great so easy to learn, here is my workflow for this site:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 name: Build and deploy Jekyll site to GitHub Pages on: push: branches: - master workflow_dispatch: jobs: jekyll: runs-on: ubuntu-latest steps: - name: 📂 setup uses: actions/checkout@v2 with: fetch-depth: "0" - name: 💎 setup ruby id: ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.2 - name: 🔨 install dependencies & build site if: steps.ruby.outcome == 'success' id: deps uses: limjh16/jekyll-action-ts@v2 env: JEKYLL_GITHUB_TOKEN: $ with: enable_cache: true - name: 🚀 deploy if: steps.deps.outcome == 'success' uses: peaceiris/actions-gh-pages@v3 with: github_token: $ publish_dir: ./_site
There are four steps:
- Checkout the repository
- Setup Ruby
- Install Dependencies & Build Site - Installs all of the site dependencies / plugins etc. and then builds the site static content
- Deploy - Deploys the generated site to GitHub Pages
As you can see this runs whenever changes are pushed to the
master branch, or I can manually run the workflow with
The last thing we need is somewhere to host the site. The beauty about this is that Jekyll is just creating static HTML content, making loads of options available. In my case, to keep costs down I use Github Pages, its totally free, comes with SSL Certificates and seems to perform well enough for most small static sites.
If you wanted something more performant, you could use Amazon S3, Digital Ocean Spaces Object Storage, or some other cloud-based solution.
I understand that this site is basic, but keeping it this way helps me focus on other things, I have no need to worry about keeping patching and the onslaught of spam. It just works! Since its hosted on GitHub Pages I don’t need to worry about the hosting, but should the site be suspended for some reason, I can easily take my content and move it elsewhere with little hassle.
Hopefully, if you’re looking to create new content and save yourself some hassle you would look at doing this option. The point (for me at least) is just to share what I think is cool and what I work on.