Skip to content

Commit 935f53a

Browse files
committed
Upgrade dpl-docs to Ddox 0.16
1 parent 110116a commit 935f53a

File tree

9 files changed

+24
-18
lines changed

9 files changed

+24
-18
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Make sure you have these prerequisites working:
1111
* The C++ compiler for your platform (invokable as `gcc`)
1212
* Optional: `latex` for building the pdf documentation
1313
* Optional: `kindlegen` for building the Kindle documentation
14-
* If you're running OSX, make sure you have some version of `libevent` installed (needed for Ddox)
1514

1615
## Getting the code
1716

dpl-docs/dub.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "dpl-docs",
33
"dependencies": {
4-
"ddox": "~>0.15.0"
4+
"ddox": "~>0.16.7"
55
},
6-
"versions": ["VibeCustomMain", "VibeNoSSL"]
6+
"versions": ["VibeNoSSL"],
7+
"subConfigurations": { "eventcore": "libasync"}
78
}

dpl-docs/dub.selections.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"ddox": "0.15.18",
5-
"experimental_allocator": "2.70.0-b1",
4+
"botan": "1.12.9",
5+
"botan-math": "1.0.3",
6+
"ddox": "0.16.7",
7+
"diet-ng": "1.4.3",
8+
"eventcore": "0.8.17",
69
"hyphenate": "1.1.1",
710
"libasync": "0.8.3",
8-
"libdparse": "0.7.0",
9-
"libev": "5.0.0+4.04",
11+
"libdparse": "0.7.1",
1012
"libevent": "2.0.2+2.0.16",
1113
"memutils": "0.4.9",
12-
"vibe-d": "0.7.31"
14+
"openssl": "1.1.5+1.0.1g",
15+
"taggedalgebraic": "0.10.7",
16+
"vibe-core": "1.2.0",
17+
"vibe-d": "0.8.1"
1318
}
1419
}

dpl-docs/source/app.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ int main(string[] args)
1616
environment["GIT_TARGET"] = git_target;
1717
environment["NO_EXACT_SOURCE_CODE_LINKS"] = noExactSourceCodeLinks ? "1" : "0";
1818
setLogFormat(FileLogger.Format.plain);
19+
if (args.length > 1 && args[1] != "filter")
20+
args ~= "--html-style=pretty";
1921
return ddoxMain(args);
2022
}

dpl-docs/views/ddox.inc.module-tree.dt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
- import ddox.entities;
22

3-
- Module getPackageModule(Package pack)
4-
- import std.algorithm : find;
5-
- if (auto pp = cast(Package)pack.parent)
6-
- return pp.lookup!Module(pack.name);
7-
- return null;
8-
93
- void moduleNavTree(Package pack, Module pack_mod)
104
- string pack_class = "expand-container";
115
- foreach(i, p; pack.packages)

dpl-docs/views/ddox.layout.dt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ block title
55
block ddox.title
66

77
block navigation
8+
include ddox.inc.utils
89
include ddox.inc.module-tree
910

1011
block body

dpl-docs/views/ddox.overview.dt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ block ddox.title
77
- title = "API documentation";
88

99
block ddox.members
10+
- import std.conv : to;
1011

1112
- void moduleInfoRec(Package pack)
1213
- foreach( p; pack.packages )
@@ -16,7 +17,7 @@ block ddox.members
1617
tr
1718
td
1819
a(href="#{info.linkTo(m)}")
19-
code!= m.qualifiedName.replace(".", "<wbr/>.")
20+
code!= m.qualifiedName.to!string.replace(".", "<wbr/>.")
2021
td
2122
- if( m.docGroup )
2223
|!= info.formatDoc(m.docGroup, 0, sec => sec == "$Short")
@@ -27,7 +28,7 @@ block ddox.members
2728
- foreach( m; pack.modules )
2829
- if (m.qualifiedName.startsWith(prefix))
2930
a(href="#{info.linkTo(m)}")
30-
code!= m.qualifiedName.replace(".", "<wbr/>.")
31+
code!= m.qualifiedName.to!string.replace(".", "<wbr/>.")
3132

3233
table
3334
col.caption

dpl-docs/views/inc.disqus.dt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
- import std.conv : text;
12
div#disqus_thread
23
script(language="javascript").
34
var disqus_shortname = 'vibe-d'; // required: replace example with your forum shortname
45
var disqus_developer = 1;
5-
var disqus_identifier = #{"\\\"phobos-" ~ info.node.qualifiedName ~ "\\\""};
6+
var disqus_identifier = #{text(`"phobos-`, info.node.qualifiedName.text, `"`)};
67

78

89
/* * * DON'T EDIT BELOW THIS LINE * * */

dpl-docs/views/layout.dt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ html(lang='en-US')
77
| All Rights Reserved.
88
| https://dlang.org/foundation.html
99
- import std.process : environment;
10+
- import std.array : replace;
1011
- string version_id = environment["GIT_TARGET"];
1112
- bool noExactSourceCodeLinks = environment["NO_EXACT_SOURCE_CODE_LINKS"] == "1";
1213
- bool haveVersion = version_id.startsWith("v");
@@ -51,7 +52,7 @@ html(lang='en-US')
5152
span Documentation
5253
ul
5354
li
54-
a(href="#{root_dir}spec/spec.html")Language Reference
55+
a(href="#{root_dir}spec/spec.html") Language Reference
5556
li
5657
a(href="#{root_dir}phobos/index.html") Library Reference
5758
li
@@ -159,6 +160,7 @@ html(lang='en-US')
159160
#content.hyphenate
160161
#tools
161162
div
163+
- import ddox.entities : Declaration;
162164
- auto modname = info.node.moduleName;
163165
- string project = "dlang.org";
164166
- string path_prefix, line_suffix, filename;

0 commit comments

Comments
 (0)