Skip to content

Commit

Permalink
Adding ISO timestamps for new posts and fixing homepage archive link
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlong committed Mar 19, 2024
1 parent 0d1fe5b commit 71fd182
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bin/new.sh
Expand Up @@ -8,10 +8,11 @@ e_question "What's the slug gonna be? (lowercase, dash-separated)"
read slug
e_question "What's the title? (string)"
read title
e_question "What tags? array:[motion, neovim, thoughts, tooling]"
e_question "What tags? array:[motion, neovim, process, thoughts, tooling]"
read tags
new_path="content/blog/${slug}.md"
new_date="$(date '+%Y-%m-%d')"
# Use ISO timestamp: https://rknight.me/blog/eleventy-post-dates/
new_date="$(date '+%Y-%m-%dT%H:%M:%S%z')"
touch ${new_path}

# Prepend yaml, we have to rewrite the file back in tho :(
Expand Down
10 changes: 7 additions & 3 deletions content/index.njk
@@ -1,10 +1,14 @@
---
layout: layouts/full.njk
extraJS:
- name: rive
src: https://unpkg.com/@rive-app/canvas@2.7.0

---

<section class="intro full radial-bottom">
<section class="intro full radial-bottom relative">
<div class="content-inner mx-auto">
<div class="intro-content flow">
<div class="intro-content flow z-1 relative">
<p class="intro-eyebrow lh-1">Nathan Long</p>
<h1 class="intro-title">Designer brain,<br/>developer heart.</h1>
<p>UI Developer at <a href="https://www.viget.com">Viget</a></p>
Expand All @@ -23,7 +27,7 @@ layout: layouts/full.njk
{% set postslistCounter = collections.posts | length %}
{% include "postslist.njk" %}

<a class="btn text-small flow-3" role="button" draggable="false" href="{{ '/posts/' | url }}" data-module="link-button">Archive &rarr;</a>
<a class="btn text-small flow-3" role="button" draggable="false" href="{{ '/blog/' | url }}" data-module="link-button">More Words &rarr;</a>
</div>
</section>

Expand Down

0 comments on commit 71fd182

Please sign in to comment.