local path = ...
local sources = {
-- user section
	acl = {title = 'access control lists'};
-- admin section
	--overview = {title = 'server overview', priv = 'config'};
	invocation = {title = 'daemon invocation', priv = 'config'};
	usr = {title = 'user accounting', priv = {'elevate','demote','purge','herald'}};
	--srvcfg = {title = 'server configuration policies', priv = 'config'};
	--discipline = {title = 'disciplinary measures', priv = 'discipline'};
	--backends = {title = 'storage backends', priv = 'config'};
		--pgsql = {title = 'pgsql', priv = 'config', parent = 'backends'};
}

local util = dofile 'common.lua'
local ingest = function(filename)
	return (util.exec { 'cmark', '--smart', '--unsafe', (path..'/'..filename) }):gsub('\n','')
end

local doc = {}
for n,meta in pairs(sources) do doc[n] = {
	name = n;
	text = ingest(n .. '.md');
	meta = meta;
} end
return doc
