Commit graph

18 commits

Author SHA1 Message Date
Paul Gauthier
c48d7be1f6 adjusted blog layout 2024-05-02 18:03:01 -07:00
Paul Gauthier
e07a3dd9ef layout 2024-02-19 17:46:57 -08:00
Paul Gauthier
fd926822bf layout 2024-02-19 14:53:21 -08:00
Paul Gauthier
9982a5b4e2 aider: Make the highlight image max 200px wide and position it to the left of the excerpt in blog post entries.
# Aider chat conversation:

USER: make the highlight image be max 200px wide and make it be to the left of the excerpt

ASSISTANT: Here are the diffs for the requested changes:

```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
   {% for post in site.posts %}
     <article class="post">
       <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
-      {% if post.highlight_image %}
-      <div class="post-highlight">
-        <img src="{{ site.baseurl }}{{ post.highlight_image }}" alt="Highlight Image">
-      </div>
-      {% endif %}
       <div class="entry">
+        <div class="post-content">
+          {% if post.highlight_image %}
+          <div class="post-highlight">
+            <img src="{{ site.baseurl }}{{ post.highlight_image }}" alt="Highlight Image">
+          </div>
+          {% endif %}
           {% if post.excerpt %}
           {{ post.excerpt }}
           {% else %}
           {{ post.content | strip_html | truncatewords: 100 }}...
           {% endif %}
+        </div>
       </div>

       <p class="post-date">
```

```diff
--- assets/css/style.scss
+++ assets/css/style.scss
@@ ... @@
 .post {
   background: #fff;
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
   margin-bottom: 2em;
   padding: 1em;
   border-radius: 4px;
+  display: flex;
+  align-items: flex-start;
 }
 .post-date {
   color: #777;
   font-size: 0.85em;
   margin-bottom: 1em;
   display: block;
 }
+
+.post-highlight {
+  max-width: 200px;
+  margin-right: 1em;
+}
+
+.post-content {
+  flex: 1;
+}
```

These changes will make the highlight image have a maximum width of 200px and float to the left of the excerpt or content in the blog post entries. The CSS changes also include adjustments to ensure proper alignment and spacing.
2024-02-19 14:47:00 -08:00
Paul Gauthier
23f99c2691 Added font size to post date and rearranged post title in blog index. 2024-02-19 14:46:59 -08:00
Paul Gauthier
b3d59539db aider: Added highlight image to the blog post and displayed it on the blog index if present.
# Aider chat conversation:

USER: use the graph as a highlight image for the blog post. add the highlight image to the blog index if one is present.

ASSISTANT: To use the graph as a highlight image for the blog post and add it to the blog index if a highlight image is present, I will make the following changes:

1. Add a `highlight_image` field to the front matter of the `_posts/2023-11-06-benchmarks-speed-1106.md` file.
2. Modify the `blog/index.html` file to check for the `highlight_image` field and display the image if it exists.

Here are the diffs for those changes:

```diff
--- _posts/2023-11-06-benchmarks-speed-1106.md
+++ _posts/2023-11-06-benchmarks-speed-1106.md
@@ ... @@
 ---
 title: Speed benchmarks of GPT-4 Turbo and gpt-3.5-turbo-1106
 excerpt: This report provides a detailed comparison of the speed of GPT-4 Turbo and gpt-3.5-turbo-1106 models based on the aider benchmarking suite.
+highlight_image: /assets/benchmarks-speed-1106.svg
 redirect_from:
   - /docs/benchmarks-speed-1106.html
 ---
```

```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
   {% for post in site.posts %}
     <article class="post">
+      {% if post.highlight_image %}
+      <div class="post-highlight">
+        <img src="{{ site.baseurl }}{{ post.highlight_image }}" alt="Highlight Image">
+      </div>
+      {% endif %}
       <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
       <div class="entry">
           {% if post.excerpt %}
```
2024-02-19 14:42:34 -08:00
Paul Gauthier
624d61f2c4 aider: Make post.date uppercase.
# Aider chat conversation:

USER: make post.date uppercase

ASSISTANT: ```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
       <p class="post-date">
-          {{ post.date | date: "%b %-d, %Y" }}
+          {{ post.date | date: "%b %-d, %Y" | upcase }}
       </p>
     </article>
   {% endfor %}
 </div>
```
2024-02-19 14:39:44 -08:00
Paul Gauthier
85e36b93ec copy 2024-02-19 14:34:47 -08:00
Paul Gauthier
955f66ded2 copy 2024-02-19 14:29:22 -08:00
Paul Gauthier
b52718d6eb cleanup 2024-02-11 08:11:48 -08:00
Paul Gauthier
97f0805c8d copy 2024-02-11 08:09:40 -08:00
Paul Gauthier
c37eaebc48 restore h1 2024-02-11 08:07:12 -08:00
Paul Gauthier
1498dc8c9d aider: Put the date under the post title.
# Aider chat conversation:

USER: put the date under the post title

ASSISTANT: ```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
 <div class="posts">
   {% for post in site.posts %}
     <article class="post">
-      <p class="post-date">{{ post.date | date: "%b %-d, %Y" }}</p>
       <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
+      <p class="post-date">{{ post.date | date: "%b %-d, %Y" }}</p>
       <div class="entry">
```
2024-02-11 08:04:31 -08:00
Paul Gauthier
65d43dff0f aider: Add a date to each blog entry.
# Aider chat conversation:

USER: add a date to each blog entry

ASSISTANT: ```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
 <div class="posts">
   {% for post in site.posts %}
     <article class="post">
+      <p class="post-date">{{ post.date | date: "%b %-d, %Y" }}</p>
       <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
       <div class="entry">
           {% if post.excerpt %}
```
2024-02-11 08:02:11 -08:00
Paul Gauthier
e630e51668 better excerpt logic; fixed svg ref 2024-02-11 07:55:44 -08:00
Paul Gauthier
d7476bb303 aider: Update blog index to display post excerpt if available, otherwise use the first 100 words.
# Aider chat conversation:

USER: use the excerpt if one exists, otherwise keep using the first 100 words

ASSISTANT: ```diff
--- blog/index.html
+++ blog/index.html
@@ ... @@
 <div class="entry">
-    {{ post.content | strip_html | truncatewords: 100 }}...
+    {{ post.excerpt | default: post.content | strip_html | truncatewords: 100 }}...
 </div>
```
2024-02-11 07:52:29 -08:00
Paul Gauthier
ac22c314d1 use first 100 words for excerpt 2024-02-11 06:16:21 -08:00
Paul Gauthier
3fb698cdca added blog 2024-02-11 06:07:29 -08:00