Skip to content

Commit 64f7320

Browse files
authored
Merge pull request #2477 from dotty-staging/topic/dottydoc-scaladays-enhancements
Some enhancements for Dottydoc and ScalaDays
2 parents 5d39c87 + 4046ac4 commit 64f7320

32 files changed

+655
-485
lines changed
File renamed without changes.

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,12 @@ class ScalaSettings extends Settings.SettingGroup {
123123
sys.props("user.dir").split(File.separatorChar).last
124124
)
125125

126+
val projectVersion = StringSetting (
127+
"-project-version",
128+
"project version",
129+
"The current version of your project",
130+
""
131+
)
132+
126133
val wikiSyntax = BooleanSetting("-Xwiki-syntax", "Retains the Scala2 behavior of using Wiki Syntax in Scaladoc")
127134
}

doc-tool/resources/_includes/scala-logo.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<div class="index-wrapper" style="top: {{ sidebarTop }};">
2+
<ul class="toc">
3+
{% assign parent = page.path | first %}
4+
{% for title in sidebar %}
5+
<li>{% renderTitle title, parent %}</li>
6+
{% endfor %}
7+
</ul>
8+
9+
<ul class="index-entities">
10+
{% if docs.size > 0 %}
11+
<li class="index-title">
12+
<span>API</span>
13+
</li>
14+
{% endif %}
15+
{% for pkg in docs %}
16+
<li class="index-entity entity-package">
17+
<h1><a class="entity-name" href="{{ site.baseurl }}/api/{{ pkg.path | join: "/" }}/index.html">{{ pkg.name }}</a></h1>
18+
<ul class="package-entities">
19+
<div id="cover-block"></div>
20+
{% for member in pkg.children %}
21+
{% if member.kind == "object" and member.hasCompanion %}
22+
{% elsif member.kind != "package" %}
23+
<li class="{% if member.hasCompanion %} with-companion {% endif %}">
24+
<div class="entity-kinds">
25+
{% if member.hasCompanion %}
26+
<a class="letter-anchor object" href="{{ site.baseurl }}/api/{{ member.companionPath | join: "/" }}.html">O</a>
27+
{% endif %}
28+
<a class="letter-anchor {{ member.kind }}" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.kind | first | capitalize }}</a>
29+
</div>
30+
<a class="entity-name" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.name }}</a>
31+
</li>
32+
{% endif %}
33+
{% endfor %}
34+
</ul>
35+
</li>
36+
{% endfor %}
37+
</ul>
38+
</div>

doc-tool/resources/_includes/toc.html

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div id="toolbar">
2+
<a id="home-button" href="{{ site.baseurl }}/index.html">
3+
{% include "scala-logo.svg" %}
4+
</a>
5+
<div id="project-details">
6+
<h1 id="project-name">{{ site.project }} Documentation</h1>
7+
<h2 id="project-version">{{ site.version }}</h2>
8+
</div>
9+
</div>

0 commit comments

Comments
 (0)