diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-19 03:02:56 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-19 03:02:56 +0000 |
commit | 1db3acf2bbb07034aafc552f322633a96b748cf4 (patch) | |
tree | 01227822acc2f3b2641e108b814d38c64031ff4e /support/make4ht/filters | |
parent | 41041c6bdcedcc33698491c2caec4cd725a4fe97 (diff) |
CTAN sync 202202190302
Diffstat (limited to 'support/make4ht/filters')
-rw-r--r-- | support/make4ht/filters/make4ht-staticsite.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/support/make4ht/filters/make4ht-staticsite.lua b/support/make4ht/filters/make4ht-staticsite.lua index 5620f9c8bb..fba4d220b1 100644 --- a/support/make4ht/filters/make4ht-staticsite.lua +++ b/support/make4ht/filters/make4ht-staticsite.lua @@ -58,13 +58,17 @@ local function update_properties(properties, dom) -- enable properties update from the config or build file local settings = get_filter_settings "staticsite" or {} local header = settings.header or {} + -- set non-function properties first + for field, rule in pairs(header) do + if type(rule) ~="function" then + properties[field] = rule + end + end + -- then execute functions. it ensures that all propeties set in header are available for field, rule in pairs(header) do -- it is possible to pass function as a rule, it will be executed with properties as a parameter if type(rule) == "function" then properties[field] = rule(properties, dom) - else - -- otherwise set properties - properties[field] = rule end end return properties |