A place to share technical learnings, etc.
aws | jekyll | github | apigateway | serverless | ad | powershell | windows | webdev | nodejs | terraform | consul | nomad | jenkins | traefik | azuread | azure | nextjs |
I had a hell of a time trying to get Github Pages going with the Jekyll support. The basics are pretty easy to get going, but I couldn’t get some of the more “advanced” features going without digging around. This is my attempt at documenting some of those learnings.
This page has been an excellent resource: https://jekyllrb.com/docs/
Global configuration goes in the _config.yml file at the root of the repo. Stuff like the global theme configuration, title, author, etc go in here.
The layout files are in the _layouts folder. default.html is the base configuration, post.html is use for posts.
To set titles for individual pages, start the page with the following metadata:
---
title: "How to Use Github Pages with Jekyll"
---
![APIGatewayMultipleStages](https://www.rayterrill.com/assets/APIGatewayMultipleStages.PNG)
To set tags for a post, add the tags section to the front matter for a post:
---
layout: post
title: A Trip
categories: [blog, travel]
tags: [hot, summer]
---
{% for category in site.categories %}
<h3>{{ category[0] }}</h3>
<ul>
{% for post in category[1] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
{{ post.excerpt }}
</li>
{% endfor %}
</ul>
Drafts go in the _drafts folder without a date in the filename
Wrap code with raw endraw tags like the following: