make README and example helpers.awk the same

This commit is contained in:
nuex 2011-11-09 21:08:53 -05:00
parent 05222e0a70
commit ea8f8c7a79
1 changed files with 4 additions and 3 deletions

View File

@ -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.