Skip to content

Commit

Permalink
Script to generate blog templates (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
evadb authored and dsamojlenko committed Jan 9, 2018
1 parent efebda8 commit 3345b79
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions create-blog
@@ -0,0 +1,35 @@
#!/bin/bash

YEAR=`date +%Y`
MONTH=`date +%m`
DAY=`date +%d`

# Create English template
cat > ./_posts/en/$YEAR-$MONTH-$DAY-$1.md << EOF
---
title: ""
description: ""
author:
date: $YEAR-$MONTH-$DAY 09:00:00 -0400
image:
image-alt:
lang: en
layout: cds/post
trans_url: "/$YEAR/$MONTH/$DAY/$2"
---
EOF

# Create French template
cat > ./_posts/fr/$YEAR-$MONTH-$DAY-$2.md << EOF
---
title: ""
description: ""
author:
date: $YEAR-$MONTH-$DAY 09:00:00 -0400
image:
image-alt:
lang: fr
layout: cds/post
trans_url: "/$YEAR/$MONTH/$DAY/$1"
---
EOF

0 comments on commit 3345b79

Please sign in to comment.