It's easy to dev blog
...the hard part is writing the words.
Here's a basic step-by-step to creating the most basic dev blog that looks reasonably OK. No, we aren't using JavaScript. No, we aren't using a template. Yes, signing up for a WordPress instance is probably easier. π
1. Create your .github.io repository
You get a ready-made GitHub Pages <username>.github.io
domain that's perfect for your basic website needs. Just create a new repository like jcbhmr.github.io
but replace jcbhmr
with your GitHub username.
2. Enable GitHub pages
In your repository settings you need to turn on GitHub Pages to make it pull Jekyll content (that's the magic⨠default GitHub Pages build tool) from your GitHub repository.
You can find the menu to turn on GitHub Pages in the Settings tab of your repository under the Pages sidebar menu.
Make sure you set the source branch!
After you hit Save you should be able to visit <username>.github.io
as a website. (It may take a minute to deploy things so be patient.)
3. Setup a post index page theme
The default Primer GitHub Pages theme is nice... but it lacks a homepage index of your most recent blog posts. π’ IMO the best path forward is to switch to another default theme: the builtin default Jekyll Minima theme.
To do that, create a _config.yml
file in your GitHub repository that you created in step 1 and add the following line:
_config.yml
remote_theme: jekyll/minima
πβοΈ More Minima settings!
Why again do you need to do this? Because we need to set the theme to something and Minima provides a good default blog style & setup. If you prefer GitHub-Flavored Markdown to the default Kramdown you'll also want to add markdown: GFM
to _config.yml
.
4. Write your content!
Make a _posts/
folder and then create a _posts/2020-01-01-hello-world.md
document. (Change the date to reflect your date) Add some content to it! Just make sure it has some YAML frontmatter specifying it's layout: post
and title: Your text here
.
_posts/2020-01-01-hello-world.md
---
title: Hello world!
---
<mark>Hello world!</mark> This is some [blog](#) _post_ **content**.
## I'm another section header
Now you have your new fancy dev blog post on your own website! π₯³ And it only took a few files!
It should look something like this
Or just use something else
You can always use WordPress, Google Docs Publishing, a GitHub Gist, DEV.to, or any other platform that you feel comfortable with. Once you get something on a (digital) paper somewhere so that you can show someone or post a link somewhere, that's OUTSTANDING already! π