diff --git a/_includes/sidebar.html b/_includes/sidebar.html index be1fd8b..2f97862 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -32,6 +32,6 @@
Powered by jekyll and Fohdeesha.
Last updated: {{ site.time }} -
Site source · nq4tango(at)gmail.com
+
Site source · nq4tango(at)gmail.com diff --git a/commit.sh b/commit.sh new file mode 100755 index 0000000..423bfe2 --- /dev/null +++ b/commit.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +commit=$@ + +git add * +git commit -m "$commit" +git push origin master diff --git a/composepage.sh b/composepage.sh new file mode 100755 index 0000000..d4ebc9b --- /dev/null +++ b/composepage.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# nq4t.com page composer +# by: Jay/nq4t + +# usage: ./compose.sh [category] [title] +# example: /compose.sh Tech MY AWESOME POST TITLE NO YOU DON'T NEED TO ENCLOSE IT! +# run in the root of your site files/repository +# assumes categories are directories in root + +# Variables and category argument +category=$1 +pd=$(date +'%Y-%m-%d') +pt=$(date +'%T') +file=blog$$.md +# Ditch the category argument +shift 1 +# Read everything else as title. +title=$@ +t=${title,,} +t=${t// /-} +fd=$(date +'%Y/%^b/%d') +# Let's write the front matter to our temp file. +printf -- "---\ntitle: $title\nlayout: page\ndate: $pd $pt\ncategory: ${category^}\nexcerpt_separator: \n---\n\n" >> $file +# Write the post in whatever editor you want. +nano + $file + +# Spell check, move the file to category/_posts replacing spaces with hyphen, remove .bak +aspell check $file +mv $file pages/_posts/$pd-${t// /-}.md +rm $file.bak +# Display some output to verify it's done. +printf "\nPage $title categorized in $tag: pages/_posts/$pd-$t.md\n\n" diff --git a/composepost.sh b/composepost.sh new file mode 100755 index 0000000..841ea7f --- /dev/null +++ b/composepost.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# nq4t.com blog post composer +# by: Jay/nq4t + +# usage: ./compose.sh [tag] [title] +# example: /compose.sh blog MY AWESOME POST TITLE NO YOU DON'T NEED TO ENCLOSE IT! +# run in the root of your site files/repository +# assumes categories are directories in root + +# Variables and category argument +tag=$1 +pd=$(date +'%Y-%m-%d') +pt=$(date +'%T') +file=blog$$.md +# Ditch the category argument +shift 1 +# Read everything else as title. +title=$@ +t=${title,,} +t=${t// /-} +fd=$(date +'%Y/%^b/%d') +# Let's write the front matter to our temp file. +printf -- "---\ntitle: $title\nlayout: post\ndate: $pd $pt\ntags: ${tag^}\nexcerpt_separator: \n---\n\n" >> $file +# Write the post in whatever editor you want. +nano + $file + +# Spell check, move the file to category/_posts replacing spaces with hyphen, delete .bak +aspell check $file +mv $file blog/_posts/$pd-${t// /-}.md +rm $file.bak +# Display some output to verify it's done. +printf "\nPost $title tagged in $tag: blog/_posts/$pd-$t.md\n\n" diff --git a/devsite.sh b/devsite.sh new file mode 100755 index 0000000..184d302 --- /dev/null +++ b/devsite.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +bundle exec jekyll serve -H 0.0.0.0