forked from enlightenment/efl
docs: add writer support for pagetitle plugin
This commit is contained in:
parent
3b175fd7e9
commit
b04c0cf241
|
@ -48,7 +48,7 @@ M.Writer = util.Object:clone {
|
||||||
INCLUDE_NAMESPACE = 2,
|
INCLUDE_NAMESPACE = 2,
|
||||||
INCLUDE_TAG = 3,
|
INCLUDE_TAG = 3,
|
||||||
|
|
||||||
__ctor = function(self, path)
|
__ctor = function(self, path, title)
|
||||||
local subs
|
local subs
|
||||||
if type(path) == "table" then
|
if type(path) == "table" then
|
||||||
subs = dutil.path_join(unpack(path))
|
subs = dutil.path_join(unpack(path))
|
||||||
|
@ -57,6 +57,10 @@ M.Writer = util.Object:clone {
|
||||||
end
|
end
|
||||||
dutil.mkdir_p(subs)
|
dutil.mkdir_p(subs)
|
||||||
self.file = assert(io.open(dutil.make_page(subs), "w"))
|
self.file = assert(io.open(dutil.make_page(subs), "w"))
|
||||||
|
if title then
|
||||||
|
self:write_raw("~~Title: ", title, " ~~")
|
||||||
|
self:write_nl()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
write_raw = function(self, ...)
|
write_raw = function(self, ...)
|
||||||
|
|
Loading…
Reference in New Issue