let's see what broke
parent
1aeb4825af
commit
c6a9b042b5
@ -1,30 +0,0 @@
|
|||||||
#!/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: <!--more-->\n---\n\n" >> $file
|
|
||||||
# Write the post in whatever editor you want.
|
|
||||||
nano + $file
|
|
||||||
|
|
||||||
# Move the file to category/_posts replacing spaces with hyphen
|
|
||||||
mv $file pages/_posts/$pd-${t// /-}.md
|
|
||||||
# Display some output to verify it's done.
|
|
||||||
printf "\nPage $title categorized in $tag: pages/_posts/$pd-$t.md\n\n"
|
|
@ -1,30 +0,0 @@
|
|||||||
#!/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: <!--more-->\n---\n\n" >> $file
|
|
||||||
# Write the post in whatever editor you want.
|
|
||||||
nano + $file
|
|
||||||
|
|
||||||
# Move the file to category/_posts replacing spaces with hyphen
|
|
||||||
mv $file blog/_posts/$pd-${t// /-}.md
|
|
||||||
# Display some output to verify it's done.
|
|
||||||
printf "\nPost $title tagged in $tag: blog/_posts/$pd-$t.md\n\n"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
bundle exec jekyll serve -H 0.0.0.0
|
|
Loading…
Reference in New Issue