mirror of
https://github.com/TECHNOFAB11/docsonnet.git
synced 2025-12-11 22:10:13 +01:00
fix(doc-util): ensure indexes get path prefixes (#36)
This commit is contained in:
parent
0486f08fc1
commit
e7f3020f57
1 changed files with 8 additions and 2 deletions
|
|
@ -33,6 +33,12 @@
|
|||
|||,
|
||||
},
|
||||
|
||||
joinPathPrefixes(prefixes, sep='/')::
|
||||
std.join(sep, prefixes)
|
||||
+ (if std.length(prefixes) > 0
|
||||
then sep
|
||||
else ''),
|
||||
|
||||
joinPrefixes(prefixes, sep='.')::
|
||||
std.join(sep, prefixes)
|
||||
+ (if std.length(prefixes) > 0
|
||||
|
|
@ -345,14 +351,14 @@
|
|||
if std.length(prefixes) > 0
|
||||
then package.name + '.md'
|
||||
else 'README.md';
|
||||
local path = root.joinPrefixes(prefixes, '/');
|
||||
local path = root.joinPathPrefixes(prefixes);
|
||||
{
|
||||
[path + key]: root.renderPackage(package),
|
||||
}
|
||||
+ (
|
||||
if std.length(package.subPackages) > 0
|
||||
then {
|
||||
[package.name + '/index.md']: root.renderIndexPage(package, prefixes),
|
||||
[path + package.name + '/index.md']: root.renderIndexPage(package, prefixes),
|
||||
}
|
||||
else {}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue