From 6cc6c818f75b92f8d8442bf46e2f861810fbcee8 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Mon, 7 Mar 2016 21:40:47 +0100 Subject: [PATCH] Add md5 and sha1 template funcs --- content/templates/functions.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/templates/functions.md b/content/templates/functions.md index 979e603f9..e36e814d3 100644 --- a/content/templates/functions.md +++ b/content/templates/functions.md @@ -595,6 +595,33 @@ CJK-like languages. ``` +### md5 + +`md5` hashes the given input and returns its MD5 checksum. + +```html +{{ md5 "Hello world, gophers!" }} + +``` + +This can be useful if you want to use Gravatar for generating a unique avatar: + +```html + +``` + + +### sha1 + +`sha1` hashes the given input and returns its SHA1 checksum. + +```html +{{ sha1 "Hello world, gophers!" }} + +``` + + + ## URLs ### absURL, relURL