Add deploy scripts

This commit is contained in:
Matt Cengia 2022-04-14 13:31:13 +10:00
parent eeb9442c3f
commit bbb58db383
Signed by: mattcen
GPG Key ID: 652968EE25069D6F
2 changed files with 20 additions and 0 deletions

10
deploy Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Add the following to ~/.ssh/config:
#Host mumblings
# Hostname dane.mattcen.com
# User mumbler
# Port 54322
hugo --gc --cleanDestinationDir
rsync -aiP public/ mumblings:hugo/ --delete

10
newpost Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
post_title=$*
post_title_uri=${post_title,,}
post_title_uri=${post_title_uri//[[:punct:]]/}
post_title_uri=${post_title_uri// /\-}
post_path=content/posts/$(date +%F)-${post_title_uri}.md
hugo new "$post_path"