6

Static Blog — Hi, I’m Sam

 2 years ago
source link: https://soffes.blog/static-blog
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Static Blog — Hi, I’m Sam

Static Blog — Hi, I’m Sam

Hi, I’m Sam

This is my blog. I also have a website thing.

Static Blog

Posted on February 3, 2019

So I redid my blog again. I don’t think there is a piece of software I have worked on more over the years. Way back in 2006, I remember constantly redoing my custom WordPress theme over and over again. Since then I rewrote it in PHP a bunch of times, Rails a few times, and then some weird stuff on top of Sinatra for awhile. I tried Jekyll on GitHub pages, WordPress, Roon, Ghost, and probably some other stuff mixed in there too.

This iteration is built on top of Jekyll, a static site generator written in Ruby. My previous iteration was built on the idea that I should store my posts separately in a repo that’s just Markdown and the images used in the posts. I optimized for a format that I enjoy writing with the hope that it would help me write more. The blog imported the posts and did a bunch of processing to eventually store the rendered posts in Redis.

Lately, I’ve been playing with Netlify, a great static site host. It’s been really great of a bunch of simple projects. My blog was the last big thing I had on Heroku and wasn’t cheap to run. I figured since it was mostly static already, I could just convert it to Jekyll without too much effort.

Since I write my posts differently than Jekyll expects, I had to write several plugins to make things work correctly. You might wonder why I don’t just write my posts the way Jekyll wants instead of doing all of this work. I want to keep the details of my blogging engine separate from my content.

Feel free to explore my plugins (this links to the state at the time of this writing) if you’re curious. The main things of note are a custom excerpt processor, pagination, and JSON feed support. There is also a plugin that moves images around and handles rewriting paths. I like storing images for my posts in the same folder as the post instead of all in one directory.

Another thing that’s cool is everything auto-deploys. When I push a commit to my blog repo or posts repo, Netlify automatically deploys the site in about a minute. It’s pretty great to not have to worry about deploys ever.

I don’t necessarily recommend doing this yourself, but I really like this setup. I had a really good time exploring Jekyll’s plugin support. Time to start writing more.

Thanks to Rafa for talking up Netlify and motivating this project! Thanks to Bryn for encouragement along the way.

Staying Positive

Posted on December 21, 2018

About 6 months ago, I tweeted that I want to be known for being positive.

I want to be known for going out of my way to be positive. Hold me to that.

@soffes on 2018-07-17

I think the value positivity is underrated. When you go out of your way to be positive, it really changes your outlook on life. The idea of being known for always being positive is really interesting to me.

Continue reading →

© 2006-2022 Sam Soffes


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK