Skip to content

Commit

Permalink
Update to DDOX 0.9.19 with multiple declarations per page support.
Browse files Browse the repository at this point in the history
 - Fixes the code that implants a link into the page title
 - Includes dub.selections.json, to make sure everyone uses the same dependencies.
  • Loading branch information
s-ludwig authored and MartinNowak committed Nov 7, 2014
1 parent fdbf5a3 commit 82aef1d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
10 changes: 10 additions & 0 deletions dpl-docs/dub.selections.json
@@ -0,0 +1,10 @@
{
"fileVersion": 1,
"versions": {
"ddox": "0.9.19",
"vibe-d": "0.7.19",
"libevent": "~master",
"openssl": "~master",
"libev": "~master"
}
}
2 changes: 1 addition & 1 deletion dpl-docs/package.json
@@ -1,7 +1,7 @@
{
"name": "dpl-docs",
"dependencies": {
"ddox": ">=0.9.14"
"ddox": "~>0.9.19"
},
"versions": ["VibeCustomMain"]
}
2 changes: 1 addition & 1 deletion dpl-docs/source/app.d
Expand Up @@ -11,6 +11,6 @@ int main(string[] args)
getopt(args, std.getopt.config.passThrough,
"git-target", &git_target);
environment["GIT_TARGET"] = git_target;
setPlainLogging(true);
setLogFormat(FileLogger.Format.plain);
return ddoxMain(args);
}
6 changes: 4 additions & 2 deletions dpl-docs/views/layout.dt
Expand Up @@ -107,8 +107,10 @@ html(lang='en-US')
| View or edit the community-maintained wiki page associated with this page.

- auto hidx = std.string.indexOf(title, ' ');
- if( hidx > 0 && title[0 .. hidx] != "Module" )
h1!= title[0 .. hidx+1] ~ "<code><a href=\"" ~ info.linkTo(info.node.parent) ~ "\">" ~ info.node.moduleName ~ "</a>" ~ (cast(Module)info.node ? "" : "." ~ title[hidx+1 .. $]) ~ "</code>"
- if (title.endsWith(" - multiple declarations"))
h1 <code><a href="#{info.linkTo(info.mod)}">#{info.mod.qualifiedName}</a>.#{title[0 .. $-24]}</code> #{title[$-24 ..$]}
- else if (hidx > 0 && title[0 .. hidx] != "Module" && info.mod)
h1 #{title[0 .. hidx]} <code><a href="#{info.linkTo(info.mod)}">#{info.mod.qualifiedName}</a>.#{title[hidx+1 .. $]}</code>
- else
h1= title
block body
Expand Down

0 comments on commit 82aef1d

Please sign in to comment.