This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/attic.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 735d411  Regenerated website based on 
43129e88e2632ece3e417a4f656feb081ce51dc1 commit
735d411 is described below

commit 735d411f8805c36b520a918916501dc51091ba3a
Author: GitHub Actions <[email protected]>
AuthorDate: Thu Oct 9 17:37:44 2025 +0000

    Regenerated website based on 43129e88e2632ece3e417a4f656feb081ce51dc1 commit
---
 output/scripts/attic_filter.lua | 49 +++++++++++++++++++++++++++--------------
 1 file changed, 32 insertions(+), 17 deletions(-)

diff --git a/output/scripts/attic_filter.lua b/output/scripts/attic_filter.lua
index 8c54c05..6ea53eb 100644
--- a/output/scripts/attic_filter.lua
+++ b/output/scripts/attic_filter.lua
@@ -30,6 +30,22 @@
   Previously the project websites themselves were changed.
 ]]--
 
+-- hostnames that need special processing
+-- keys are the host names, values are the style of edit needed
+local OVERRIDES = {
+  predictionio = 'a',
+  mxnet = 'b',
+  twill = 'c',
+  eagle = 'd',
+  metamodel = 'e',
+  -- Shorthand names for testing using VAR_NAME override
+  _a = 'a',
+  _b = 'b',
+  _c = 'c',
+  _d = 'd',
+  _e = 'e'
+}
+
 function output_filter(r)
     -- We only filter text/html types
     if not r.content_type:match("text/html") then return end
@@ -57,7 +73,9 @@ function output_filter(r)
 
     -- add header:
     -- special processing needed for some hosts
-    if host == 'predictionio' or host == 'eagle' or host == 'metamodel' or 
host == 'mxnet' or host == 'twill'
+    local style = OVERRIDES[host]
+    -- if host == 'predictionio' or host == 'eagle' or host == 'metamodel' or 
host == 'mxnet' or host == 'twill'
+    if style
     then
         coroutine.yield('')
     else
@@ -66,32 +84,29 @@ function output_filter(r)
 
     -- spit out the actual page
     while bucket ~= nil do
+        local output
         -- special processing needed for hosts as above
-        if host == 'predictionio'
+        if style == 'a'
         then
-            local output = bucket:gsub('<header>', '<header>'..div, 1)
-            coroutine.yield(output)
-        elseif host == 'mxnet'
+            output = bucket:gsub('<header>', '<header>'..div, 1)
+        elseif style == 'b'
         then
-            local output = bucket:gsub('</header>', div..'</header>', 1)
-            coroutine.yield(output)
-        elseif host == 'twill'
+            output = bucket:gsub('</header>', div..'</header>', 1)
+        elseif style == 'c'
         then
             -- Fix for Javadocs: </header> does not appear in them, and
             -- topNav only appears in the Javadoc pages that can take the div 
without failing
-            local output = bucket:gsub('</header>', div..'</header>', 
1):gsub('<div class="topNav">', divnew..'<div class="topNav">', 1)
-            coroutine.yield(output)
-        elseif host == 'eagle'
+            output = bucket:gsub('</header>', div..'</header>', 1):gsub('<div 
class="topNav">', divnew..'<div class="topNav">', 1)
+        elseif style == 'd'
         then
-            local output = bucket:gsub('</nav>', '</nav>'..div, 1)
-            coroutine.yield(output)
-        elseif host == 'metamodel'
+            output = bucket:gsub('</nav>', '</nav>'..div, 1)
+        elseif style == 'e'
         then
-            local output = bucket:gsub('</nav>', div..'</nav>', 1):gsub('<div 
class="topNav">', divnew..'<div class="topNav">', 1)
-            coroutine.yield(output)
+            output = bucket:gsub('</nav>', div..'</nav>', 1):gsub('<div 
class="topNav">', divnew..'<div class="topNav">', 1)
         else
-            coroutine.yield(bucket)
+            output = bucket
         end
+        coroutine.yield(output)
     end
 
     -- no need to add anything at the end of the content

Reply via email to