summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-08-26 14:28:11 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-08-26 14:28:11 +0100
commitb04c0cf241763d6153860eaa6520adc0cd26d7d9 (patch)
tree20650eac32dd06ac6b01a7330ba49abe6f39f45e
parent3b175fd7e9e3e251d1f53909aa6a32e8e3a54461 (diff)
docs: add writer support for pagetitle plugin
-rw-r--r--src/scripts/elua/apps/docgen/writer.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scripts/elua/apps/docgen/writer.lua b/src/scripts/elua/apps/docgen/writer.lua
index 0bfacb7fcf..9f7930716e 100644
--- a/src/scripts/elua/apps/docgen/writer.lua
+++ b/src/scripts/elua/apps/docgen/writer.lua
@@ -48,7 +48,7 @@ M.Writer = util.Object:clone {
48 INCLUDE_NAMESPACE = 2, 48 INCLUDE_NAMESPACE = 2,
49 INCLUDE_TAG = 3, 49 INCLUDE_TAG = 3,
50 50
51 __ctor = function(self, path) 51 __ctor = function(self, path, title)
52 local subs 52 local subs
53 if type(path) == "table" then 53 if type(path) == "table" then
54 subs = dutil.path_join(unpack(path)) 54 subs = dutil.path_join(unpack(path))
@@ -57,6 +57,10 @@ M.Writer = util.Object:clone {
57 end 57 end
58 dutil.mkdir_p(subs) 58 dutil.mkdir_p(subs)
59 self.file = assert(io.open(dutil.make_page(subs), "w")) 59 self.file = assert(io.open(dutil.make_page(subs), "w"))
60 if title then
61 self:write_raw("~~Title: ", title, " ~~")
62 self:write_nl()
63 end
60 end, 64 end,
61 65
62 write_raw = function(self, ...) 66 write_raw = function(self, ...)