Skip to content

Commit

Permalink
Add archetype for posts
Browse files Browse the repository at this point in the history
  • Loading branch information
yanirs committed Jan 18, 2024
1 parent 9b27c98 commit c719279
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yanirseroussi.com

Home of the source code for [yanirseroussi.com](https://yanirseroussi.com).
Home of the source code for [yanirseroussi.com](https://yanirseroussi.com). You won't get much out of watching the repo since I rarely use PRs. [Here's how to get commit notifications](https://yanirseroussi.com/til/2023/08/14/email-notifications-on-public-github-commits/).

Develop locally with [Hugo](https://gohugo.io/):

Expand All @@ -9,3 +9,7 @@ Develop locally with [Hugo](https://gohugo.io/):
Create a new TIL:

$ hugo new content/til/2024-01-07-something-amazing-i-learned-today.md

Create a new post:

$ hugo new content/posts/2024-01-07-something-i-want-to-share/index.md
14 changes: 14 additions & 0 deletions archetypes/posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: {{ substr .Name 11 | humanize }}
author: Yanir Seroussi
type: post
date: {{ substr .Name 0 10 }}T00:00:00+00:00
url: /{{ replace (substr .Name 0 10) "-" "/" }}/{{ substr .Name 11 }}/
cover:
relative: true
image: TODO
alt: TODO
summary: TODO
tags:
- TODO
---

0 comments on commit c719279

Please sign in to comment.