I’ve been wanting to write more on this blog but it’s always been a hassle to get anything published. Mainly because this site is a rails app and by default it’s not great for managing and publishing content.
It’s much easier and quicker to use something like HEY or Pagecord. Writing, editing and publishing is frictionless! Exactly what you need when trying to create a new habit.
Despite this, it’s fairly trivial to close the gap between your rails app and the aforementioned blogging tools. Plus, there’s something appealing about having no limits on the customizations you can undertake.
Want to use your favourite text editor theme to render code blocks? Write using markdown? File based content managment? Use a web based editor?
You can get all this easily in rails with some well chosen libraries and gems and IMO is worth the extra effort. Give it a go!
The Stack
sitepress
File based content manager. Think frontmatter, human readable slugs, layouts (create a blog post layout and render markdown inside 😍) and loads more great features which make managing content easy. If you used Jekyll you’ll feel right at home. For a good overview of Sitepress, watch this video.
markdown-rails
Works hand in hand with Sitepress. Let’s you create *.html.md
files so you can write in markdown and it’ll all render out of the box without any custom config, but it’s worth extending ApplicationMarkdown
to customize this.
PrismJS
JavaScript library to render beautiful code blocks.
prism-themes
A collection of CSS files to use with PrismJS.a
RSS
As usual, rails makes it easy to add an RSS feed to your app. No gem required. Just a simple route, controller and *.rss.builder
file.