make README and example helpers.awk the same
This commit is contained in:
parent
05222e0a70
commit
ea8f8c7a79
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user