Jekyll uses templates stored in the
_layouts folder to apply reusable designs to its pages. In a previous release, I created a list of page layouts in use on this site to help me spot inconsistencies.
For this release I’ve started to reduce the inconsistencies and duplicate code. The user story is the same though…
As a user, I need the website pages to be consistent, so that I can read and browse them easily.
- Combine the
postlayout into one
- Update the
index.mdto use the page layout
- Update the style guide to reflect the changes
The biggest change was combining the
post layouts. They are very similar, so it makes sense to merge them. But I do need to check if a page is a blog post, so that I can show the post date.
if statement looks something like this…
So that posts know they are posts, I had to add the following snippet to the