summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-18 22:12:02 +0000
committerKarl Berry <karl@freefriends.org>2022-02-18 22:12:02 +0000
commita276123bbbc409023c9148d82eae1f94c79fdd13 (patch)
tree1dcf7889496ab6170d2c35a1862d7d4bb53257e0 /Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua
parente9e8b9b63dabdf9821d16e84dfbc64a8f1ace6f7 (diff)
make4ht (18feb22)
git-svn-id: svn://tug.org/texlive/trunk@62075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua')
-rw-r--r--Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua b/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua
index a9a5bcece7c..b9272203a52 100644
--- a/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua
+++ b/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-staticsite.lua
@@ -22,6 +22,7 @@ local function get_slug(settings)
-- escape
-- slug must contain the unescaped input name
local f = io.open(published_name, "w")
+ log:info("Publishing article", os.date("%Y-%m-%d %H:%M", time))
f:write(time)
f:close()
end
@@ -79,7 +80,7 @@ end
local function remove_maketitle(make)
-- use DOM filter to remove \maketitle block
local domfilter = require "make4ht-domfilter"
- local process = domfilter {
+ local process = domfilter({
function(dom)
local maketitles = dom:query_selector(".maketitle")
for _, el in ipairs(maketitles) do
@@ -88,7 +89,7 @@ local function remove_maketitle(make)
end
return dom
end
- }
+ }, "staticsite")
make:match("html$", process)
end
@@ -120,9 +121,9 @@ function M.modify_build(make)
-- we use an bogus match which will be executed only once as the very first one to insert
-- the filters
-- I should make filter from this
- local process = filter {
+ local process = filter({
"staticsite"
- }
+ }, "staticsite")
-- detect if we should remove maketitle
local site_settings = get_filter_settings "staticsite"