Skip to content

Some enhancements for Dottydoc and ScalaDays #2477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
7 changes: 7 additions & 0 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,12 @@ class ScalaSettings extends Settings.SettingGroup {
sys.props("user.dir").split(File.separatorChar).last
)

val projectVersion = StringSetting (
"-project-version",
"project version",
"The current version of your project",
""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the version isn't specified, it falls back to an empty string. This renders nicely on the site.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

)

val wikiSyntax = BooleanSetting("-Xwiki-syntax", "Retains the Scala2 behavior of using Wiki Syntax in Scaladoc")
}
2 changes: 1 addition & 1 deletion doc-tool/resources/_includes/scala-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions doc-tool/resources/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<div class="index-wrapper" style="top: {{ sidebarTop }};">
<ul class="toc">
{% assign parent = page.path | first %}
{% for title in sidebar %}
<li>{% renderTitle title, parent %}</li>
{% endfor %}
</ul>

<ul class="index-entities">
{% if docs.size > 0 %}
<li class="index-title">
<span>API</span>
</li>
{% endif %}
{% for pkg in docs %}
<li class="index-entity entity-package">
<h1><a class="entity-name" href="{{ site.baseurl }}/api/{{ pkg.path | join: "/" }}/index.html">{{ pkg.name }}</a></h1>
<ul class="package-entities">
<div id="cover-block"></div>
{% for member in pkg.children %}
{% if member.kind == "object" and member.hasCompanion %}
{% elsif member.kind != "package" %}
<li class="{% if member.hasCompanion %} with-companion {% endif %}">
<div class="entity-kinds">
{% if member.hasCompanion %}
<a class="letter-anchor object" href="{{ site.baseurl }}/api/{{ member.companionPath | join: "/" }}.html">O</a>
{% endif %}
<a class="letter-anchor {{ member.kind }}" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.kind | first | capitalize }}</a>
</div>
<a class="entity-name" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.name }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
11 changes: 0 additions & 11 deletions doc-tool/resources/_includes/toc.html

This file was deleted.

9 changes: 9 additions & 0 deletions doc-tool/resources/_includes/toolbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="toolbar">
<a id="home-button" href="{{ site.baseurl }}/index.html">
{% include "scala-logo.svg" %}
</a>
<div id="project-details">
<h1 id="project-name">{{ site.project }} Documentation</h1>
<h2 id="project-version">{{ site.version }}</h2>
</div>
</div>
Loading