Skip to content

Commit

Permalink
Built out posts format and did some slight customization of the home …
Browse files Browse the repository at this point in the history
…page.
  • Loading branch information
stickyweather committed Mar 15, 2024
1 parent e964ade commit 7a6df59
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
7 changes: 3 additions & 4 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ <h2 class="post-list-heading">{{ page.list_title }}</h2>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
{%- for post in posts -%}
<li>
<span class="post-meta">{{ post.date | date: date_format }}</span>
<span><a href="{{ post.url | relative_url }}"><img src="{{ post.featured_image }}" alt="" width="300" height="168"></a></span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<p style="max-width: 450px;">{{ post.excerpt }}</p>
</li>
{%- endfor -%}
</ul>
Expand Down
25 changes: 24 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

<header class="post-header">
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
<p>
{%- if page.excerpt -%}
{% for excerpt in page.excerpt %}
<span class="">{{ excerpt }}</span>
{% endfor %}
{%- endif -%}
</p>
<p class="post-meta">
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
Expand All @@ -23,7 +30,23 @@ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}
<span class="p-author h-card" itemprop="name">{{ author }}</span></span>
{%- if forloop.last == false %}, {% endif -%}
{% endfor %}
{%- endif -%}</p>
{%- endif -%}
</p>
<figure>
{%- if page.featured_image -%}
{%- for featured_image in page.featured_image -%}
<div>
<picture>
<source type="image/webp" srcset="{{ featured_image }}" alt="" title="">
<img src="{{ featured_image }}">
</picture>
</div>
{%- endfor -%}
{%- endif -%}
{%- if page.image_credit -%}
<figcaption>{%- for photographer in page.photographer -%}<span>Photo by {{ photographer }} </span>{%- endfor -%}<span>{%- for photo_source in page.photo_source -%} (<a href="{{ photo_source }}" target="_blank">Source</a>){%- endfor -%}</span></figcaption>
{%- endif -%}
</figure>
</header>

<div class="post-content e-content" itemprop="articleBody">
Expand Down
6 changes: 6 additions & 0 deletions _posts/2023-10-24-sticky-weather-is-evolving.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
layout: post
title: Sticky Weather is Evolving
featured_image: /assets/media/Sticky-Weather-is-Evolving.webp
image_credit: >
photographer: Kelly Sikkema
photo_source: https://unsplash.com/@kellysikkema
excerpt: I'm changing my approach to make the newsletter more engaging, informative, and sustainable.
description: I'm changing my approach to make the newsletter more engaging, informative, and sustainable.
date: October 10, 2023
author: Forrest Brown
---
Expand Down
Binary file added assets/media/Sticky-Weather-is-Evolving.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
#
layout: home
---
---

0 comments on commit 7a6df59

Please sign in to comment.