fixed Lua Runtime. Plugins now have priority for hooks and POST for routes if requested. also changed the CSS for main.css to color #1e1e1e for darkmode body
This commit is contained in:
9
lua/plugins/examples/demo/md_banner.lua
Normal file
9
lua/plugins/examples/demo/md_banner.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
register_hook("pre_template", function(md_path, html_body)
|
||||
-- Check if the current markdown path is for test.md
|
||||
if md_path and md_path:match("test%.md$") then
|
||||
local banner = "<div class='plugin-banner' style='padding:10px;background:white;border:1px solid #f99;margin-bottom:12px;color:black;'>Note: served via Lua plugin banner</div>"
|
||||
return banner .. html_body
|
||||
end
|
||||
-- For other pages, return the original HTML body unchanged
|
||||
return html_body
|
||||
end)
|
||||
Reference in New Issue
Block a user