From ea8f8c7a7935aa1333bc10e4d57b919c2bcabb7a Mon Sep 17 00:00:00 2001 From: nuex Date: Wed, 9 Nov 2011 21:08:53 -0500 Subject: [PATCH] make README and example helpers.awk the same --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 403f491..f49160d 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,12 @@ The `helpers.awk` file is an awk script that can make custom data available to y # your custom functions function page_title( title) { - if ("title" in data) { - return data["title"] "-" data["site_title"] + if (data["title"]) { + title = data["title"] " - " data["site_title"] } else { - return data["site_title"] + title = data["site_title"] } + return title } Just be sure to set the data array in the `load_helpers()` function at the top of the script to make your custom data available to the template.