diff --git a/MCServer/Plugins/APIDump/main.css b/MCServer/Plugins/APIDump/main.css index 8041e0d01..e5685caab 100644 --- a/MCServer/Plugins/APIDump/main.css +++ b/MCServer/Plugins/APIDump/main.css @@ -61,7 +61,7 @@ footer font-family: Segoe UI Light, Helvetica; } -#content +#content, #timestamp { padding: 0px 25px 25px 25px; } diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index e841922b6..f1966d013 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -153,6 +153,16 @@ end +--- Returns the timestamp in HTML format +-- The timestamp will be inserted to all generated HTML files +local function GetHtmlTimestamp() + return string.format("
Generated on %s
", os.date("%Y-%m-%d %H:%M:%S")) +end + + + + + local function WriteArticles(f) f:write([[

Articles

@@ -296,7 +306,9 @@ local function WriteHtmlHook(a_Hook, a_HookNav) f:write("

", (example.Desc or "missing Desc"), "

\n"); f:write("
", (example.Code or "missing Code"), "\n
\n\n"); end - f:write([[]]); + f:write([[]]) + f:write(GetHtmlTimestamp()) + f:write([[]]) f:close(); end @@ -941,8 +953,10 @@ local function WriteHtmlClass(a_ClassAPI, a_ClassMenu) end end - cf:write([[]]); - cf:close(); + cf:write([[]]) + cf:write(GetHtmlTimestamp()) + cf:write([[]]) + cf:close() end @@ -1320,11 +1334,10 @@ local function DumpAPIHtml(a_API) WriteStats(f); - f:write([[ - - -]]); - f:close(); + f:write([[]]) + f:write(GetHtmlTimestamp()) + f:write([[]]) + f:close() LOG("API subfolder written"); end