diff --git a/_config.yml b/_config.yml index 86d7952..c3305e7 100644 --- a/_config.yml +++ b/_config.yml @@ -2,7 +2,15 @@ title: "bla's personal diary" subtitle: "classified information, for my eyes only! " -# Do not edit: +# Do not edit: paginate: 10 paginate_path: "page-:num" permalink: /:year/:month/:day/:title/ +defaults: + - + scope: + path: "" +# type: "posts" + values: + layout: "post" + diff --git a/_posts/14-05-30-0001.md b/_posts/14-05-30-0001.md index 02bbe04..3c709b6 100644 --- a/_posts/14-05-30-0001.md +++ b/_posts/14-05-30-0001.md @@ -1,4 +1,4 @@ --- layout: post --- -Yay this is a personal diary built with Jekyll. Simple thing, easy to extend. +Yay this is a personal diary built with Jekyll. Simple thing, easy to extend. diff --git a/all/index.html b/all/index.html index 1c78f39..d94f074 100644 --- a/all/index.html +++ b/all/index.html @@ -12,7 +12,7 @@ title: index
{% for post in site.posts %}
-

{{ post.date | date: "%d%B%Y" }}

+

{{ post.date | date: "%d%B%Y" }}#{{ post.title }}

{{ post.content }}
diff --git a/sample.Makefile b/sample.Makefile new file mode 100644 index 0000000..0a40f87 --- /dev/null +++ b/sample.Makefile @@ -0,0 +1,87 @@ +# A makefile to help encrypt posts with a password +# From https://gist.github.com/ambrosechua/e88bf467b3a0f2f14ff5 + +SHELL := /bin/zsh + +DIRECTORY = "_posts" +EXT_ENC = ".aes.b64" +EXT_FILE = ".md" +ENCRYPTION = "aes-128-cbc" + +all: usage + +usage: + @echo "Usage: " + @echo " make encrypt - checks and encrypts all '$(EXT_FILE)' files in '$(DIRECTORY)'" + @echo " make decrypt - decrypts all '$(EXT_ENC)' files in '$(DIRECTORY)'" + +encrypt: + if [ -z "`find $(DIRECTORY) -type f -regex ".*$(EXT_FILE)"`" ]; then;\ + echo "Nothing to encrypt. ";\ + exit 1;\ + fi;\ + echo -n "Enter password: ";\ + read -s pass;\ + echo;\ + echo -n "Enter password again: ";\ + read -s pass2;\ + echo;\ + if [ $$pass != $$pass2 ]; then;\ + echo "Not matching passwords. ";\ + exit 1;\ + fi;\ + for f in `find $(DIRECTORY) -type f -regex ".*$(EXT_ENC)"`; do;\ + export fn=$$(echo $$f | cut -d "." -f 1);\ + echo "$$f -> $$fn$(EXT_FILE)";\ + openssl base64 -d -in $$f -out $$fn.aes;\ + openssl $(ENCRYPTION) -d -salt -in $$fn.aes -out $$fn$(EXT_FILE) -k $$pass;\ + if [ $$? -ne 0 ]; then;\ + echo "Error: Unable to decrypt with supplied password. ";\ + rm $$fn.aes;\ + rm $$fn$(EXT_FILE);\ + exit 1;\ + else;\ + rm $$fn.aes;\ + rm $$f;\ + fi;\ + done;\ + for f in `find $(DIRECTORY) -type f -regex ".*$(EXT_FILE)"`; do;\ + export fn=$$(echo $$f | cut -d "." -f 1);\ + echo "$$f -> $$fn$(EXT_ENC)";\ + openssl $(ENCRYPTION) -salt -in $$f -out $$fn.aes -k $$pass;\ + openssl base64 -in $$fn.aes -out $$fn$(EXT_ENC);\ + rm $$fn.aes;\ + rm $$f;\ + done;\ + if [ -e _site ]; then;\ + rm -r _site;\ + fi; + +decrypt: + if [ -z "`find $(DIRECTORY) -type f -regex ".*$(EXT_ENC)"`" ]; then;\ + echo "Nothing to decrypt. ";\ + exit 1;\ + fi;\ + echo -n "Enter password: ";\ + read -s pass;\ + echo;\ + for f in `find $(DIRECTORY) -type f -regex ".*$(EXT_ENC)"`; do;\ + export fn=$$(echo $$f | cut -d "." -f 1);\ + echo "$$f -> $$fn$(EXT_FILE)";\ + openssl base64 -d -in $$f -out $$fn.aes;\ + openssl $(ENCRYPTION) -d -salt -in $$fn.aes -out $$fn$(EXT_FILE) -k $$pass;\ + if [ $$? -ne 0 ]; then;\ + echo "Error: Unable to aes-128 decrypt with supplied password. ";\ + rm $$fn.aes;\ + rm $$fn$(EXT_FILE);\ + exit 1;\ + else;\ + rm $$fn.aes;\ + rm $$f;\ + fi;\ + done; + +server: + @make serve +serve: + @jekyll serve diff --git a/styles.css b/styles.css index 8d11396..f99df28 100644 --- a/styles.css +++ b/styles.css @@ -162,6 +162,7 @@ article { } article .content { padding-left: 70px; + word-wrap: break-word; } article h1 { padding: 0;