diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2016-08-26 14:45:45 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2016-08-26 14:45:45 +0100 |
commit | 17d79745a315a4a72ae44a7f8a6227dfd866c143 (patch) | |
tree | 15529c3e65a6f8b508f22e393c3f8151b74118d4 | |
parent | d69d54ff17a73eead97cfe3eabe34298d2b7e9ad (diff) |
docs: add an option to disable title plugin usage
-rw-r--r-- | src/scripts/elua/apps/docgen/writer.lua | 8 | ||||
-rw-r--r-- | src/scripts/elua/apps/gendoc.lua | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/scripts/elua/apps/docgen/writer.lua b/src/scripts/elua/apps/docgen/writer.lua index aa29426096..91d683e0b4 100644 --- a/src/scripts/elua/apps/docgen/writer.lua +++ b/src/scripts/elua/apps/docgen/writer.lua | |||
@@ -58,8 +58,12 @@ M.Writer = util.Object:clone { | |||
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 | 60 | if title then |
61 | self:write_raw("<title>", title, "</title>") | 61 | if M.has_feature("title") then |
62 | self:write_nl() | 62 | self:write_raw("<title>", title, "</title>") |
63 | self:write_nl() | ||
64 | else | ||
65 | self:write_h(title, 1) | ||
66 | end | ||
63 | end | 67 | end |
64 | end, | 68 | end, |
65 | 69 | ||
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua index a50d3bb077..cf50b861d5 100644 --- a/src/scripts/elua/apps/gendoc.lua +++ b/src/scripts/elua/apps/gendoc.lua | |||
@@ -1058,7 +1058,8 @@ getopt.parse { | |||
1058 | { nil, "graph-theme-light", false, help = "Use light builtin graph theme." }, | 1058 | { nil, "graph-theme-light", false, help = "Use light builtin graph theme." }, |
1059 | { nil, "disable-graphviz", false, help = "Disable graphviz usage." }, | 1059 | { nil, "disable-graphviz", false, help = "Disable graphviz usage." }, |
1060 | { nil, "disable-notes", false, help = "Disable notes plugin usage." }, | 1060 | { nil, "disable-notes", false, help = "Disable notes plugin usage." }, |
1061 | { nil, "disable-folded", false, help = "Disable folded plugin usage." } | 1061 | { nil, "disable-folded", false, help = "Disable folded plugin usage." }, |
1062 | { nil, "disable-title", false, help = "Disable title plugin usage." } | ||
1062 | }, | 1063 | }, |
1063 | error_cb = function(parser, msg) | 1064 | error_cb = function(parser, msg) |
1064 | io.stderr:write(msg, "\n") | 1065 | io.stderr:write(msg, "\n") |
@@ -1096,7 +1097,8 @@ getopt.parse { | |||
1096 | local wfeatures = { | 1097 | local wfeatures = { |
1097 | notes = not opts["disable-notes"], | 1098 | notes = not opts["disable-notes"], |
1098 | folds = not opts["disable-folded"], | 1099 | folds = not opts["disable-folded"], |
1099 | dot = not opts["disable-graphviz"] | 1100 | dot = not opts["disable-graphviz"], |
1101 | title = not opts["disable-title"] | ||
1100 | } | 1102 | } |
1101 | writer.init(rootns, wfeatures) | 1103 | writer.init(rootns, wfeatures) |
1102 | dutil.rm_root() | 1104 | dutil.rm_root() |