aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-19 19:22:52 -0300
committerEuAndreh <eu@euandre.org>2021-01-19 19:22:52 -0300
commit2d7562bccb2d4d807538b9f43989271b77846860 (patch)
tree9ae8ee160a3df65c89c7f09a7864ec20417c72a9
parentrm bash/debug.gpg (diff)
downloaddotfiles-2d7562bccb2d4d807538b9f43989271b77846860.tar.gz
dotfiles-2d7562bccb2d4d807538b9f43989271b77846860.tar.xz
scripts/post.sh: Fix generation of slides
-rwxr-xr-xscripts/post.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/post.sh b/scripts/post.sh
index 3759c216..14147d40 100755
--- a/scripts/post.sh
+++ b/scripts/post.sh
@@ -34,10 +34,12 @@ case "$TYPE" in
article | til | podcast | screencast)
LAYOUT=post
DIR="_${TYPE}s"
+ EXT=md
;;
slides)
LAYOUT=slides
DIR=_slides
+ EXT=slides
;;
*)
red "Invalid type '$TYPE'\n" >&2
@@ -67,7 +69,7 @@ slugify() {
SLUG_TITLE="$(slugify "$FULL_TITLE")"
PASTE_DATE="$(date -I)"
-OUT="$DIR/$PASTE_DATE-$SLUG_TITLE.md"
+OUT="$DIR/$PASTE_DATE-$SLUG_TITLE.$EXT"
cd ~/dev/libre/website
@@ -77,6 +79,7 @@ cd ~/dev/libre/website
}
if [ "$LAYOUT" = 'slides' ]; then
+ ARTICLE="$($0 article "$FULL_TITLE")"
cat<<EOF > "$OUT"
---
@@ -90,6 +93,8 @@ lang: en
ref: $SLUG_TITLE
+article: $ARTICLE
+
---
---
@@ -98,11 +103,10 @@ ref: $SLUG_TITLE
References:
-1. these slides: [{{ site.tld }}/slides.html]({% link slides.md %})
-2. [prose version of this presentation]({% link _articles/$PASTE_DATE-$SLUG_TITLE.md %})
+1. FIXME
+2. FIXME
EOF
- "$0" article "$FULL_TITLE"
- else
+else
cat <<EOF > "$OUT"
---