add gemini support
This commit is contained in:
22
lib/fes.lua
22
lib/fes.lua
@@ -121,9 +121,9 @@ function M.fes(proto, header, footer)
|
||||
|
||||
if proto == "http" and site_config.favicon then
|
||||
site_config.favicon =
|
||||
'<link rel="icon" type="image/x-icon" href="'
|
||||
.. site_config.favicon
|
||||
.. '">'
|
||||
'<link rel="icon" type="image/x-icon" href="'
|
||||
.. site_config.favicon
|
||||
.. '">'
|
||||
end
|
||||
|
||||
local default_header
|
||||
@@ -167,12 +167,20 @@ end
|
||||
|
||||
function M:build()
|
||||
if self.proto == "http" then
|
||||
local header = self.default_header:gsub("{{TITLE}}", self.title or "Document")
|
||||
local favicon_html = self.favicon or '<link rel="icon" href="data:image/svg+xml,<svg xmlns=%%22http://www.w3.org/2000/svg%%22 viewBox=%%220 0 100 100%%22><text y=%%22.9em%%22 font-size=%%2290%%22>🔥</text></svg>">'
|
||||
local header = self.header:gsub("{{TITLE}}", self.title or "Document")
|
||||
local favicon_html = self.favicon
|
||||
or
|
||||
'<link rel="icon" href="data:image/svg+xml,<svg xmlns=%%22http://www.w3.org/2000/svg%%22 viewBox=%%220 0 100 100%%22><text y=%%22.9em%%22 font-size=%%2290%%22>🔥</text></svg>">'
|
||||
header = header:gsub("{{FAVICON}}", favicon_html)
|
||||
local footer = self.default_footer:gsub("{{COPYRIGHT}}", self.copyright or symbol.legal.copyright .. "The Copyright Holder")
|
||||
return header .. table.concat(self.parts, "\n") .. default_footer
|
||||
|
||||
local footer = self.footer:gsub(
|
||||
"{{COPYRIGHT}}",
|
||||
self.copyright or symbol.legal.copyright .. "The Copyright Holder"
|
||||
)
|
||||
|
||||
return header .. table.concat(self.parts, "\n") .. footer
|
||||
end
|
||||
|
||||
return table.concat(self.parts, "\n")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user