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

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 # your custom functions
function page_title( title) { function page_title( title) {
if ("title" in data) { if (data["title"]) {
return data["title"] "-" data["site_title"] title = data["title"] " - " data["site_title"]
} else { } 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. 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.