mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 04:53:24 +00:00
chore: merge from master
This commit is contained in:
commit
731b3db2de
0
.hugo_build.lock
Normal file
0
.hugo_build.lock
Normal file
@ -4,6 +4,11 @@ local lunacolors = require 'lunacolors'
|
||||
|
||||
commander.register('doc', function(args)
|
||||
local moddocPath = hilbish.dataDir .. '/docs/'
|
||||
local stat = fs.stat '.git/refs/heads/extended-job-api'
|
||||
if stat then
|
||||
-- hilbish git
|
||||
moddocPath = './docs/'
|
||||
end
|
||||
local apidocHeader = [[
|
||||
# %s
|
||||
{grayBg} {white}{italic}%s {reset}
|
||||
@ -34,14 +39,17 @@ Available sections: ]] .. table.concat(modules, ', ')
|
||||
subdocName = '_index'
|
||||
end
|
||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
||||
if not f then
|
||||
f = io.open(moddocPath .. subdocName:match '%w+' .. '/' .. subdocName .. '.md', 'rb')
|
||||
end
|
||||
if not f then
|
||||
moddocPath = moddocPath .. subdocName .. '/'
|
||||
subdocName = args[3] or '_index'
|
||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
||||
end
|
||||
if not f then
|
||||
print('No documentation found for ' .. args[#args] .. '.')
|
||||
return
|
||||
print('No documentation found for ' .. mod .. '.')
|
||||
return 1
|
||||
end
|
||||
end
|
||||
funcdocs = f:read '*a':gsub('-([%d]+)', '%1')
|
||||
|
Loading…
x
Reference in New Issue
Block a user