Skip to content

Commit 3c837f9

Browse files
authored
Merge pull request #11321 from romanowski/scaladoc/docs-cleanup
Keep documentation in one place.
2 parents cd7df9c + 321ece8 commit 3c837f9

33 files changed

+108
-504
lines changed

docs/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/_includes/features.html

Lines changed: 0 additions & 123 deletions
This file was deleted.

docs/_includes/getting-started.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/_includes/logo-page.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

docs/_includes/table-of-contents.html

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/css/frontpage.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import url('https://fonts.googleapis.com/css?family=Lobster&display=swap');
2-
2+
33
body {
44
height: 100%;
55
width: 100%;
@@ -60,6 +60,12 @@ section.page {
6060
min-height: 100vh;
6161
width: 100%;
6262
padding: 0;
63+
padding-bottom: 2em;
64+
}
65+
66+
section.page strong {
67+
font-weight: bold;
68+
color: rgba(255,255,255,0.6);
6369
}
6470

6571
section .container {
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/index.html

Lines changed: 100 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,104 @@
11
---
2-
title: Dotty
3-
layout: base
2+
title: Scala 3
3+
layout: main
4+
hasFrame: false
45
extraCSS:
56
- css/frontpage.css
67
---
7-
{% include logo-page.html %}
8-
{% include getting-started.html %}
8+
9+
<section class="page bg-red bg-dark">
10+
<header>
11+
<nav class="navbar navbar-expand-md navbar-dark">
12+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent">
13+
<i class="fas fa-bars"></i>
14+
</button>
15+
<div class="collapse navbar-collapse" id="navbarContent">
16+
<ul class="navbar-nav ml-auto mr-0">
17+
<li class="nav-item">
18+
<a class="nav-link" href="#getting-started">
19+
Try it now
20+
</a>
21+
</li>
22+
<li class="nav-item">
23+
<a class="nav-link" href="blog/index.html">
24+
Blog
25+
</a>
26+
</li>
27+
<li class="nav-item">
28+
<a class="nav-link" href="docs/index.html">
29+
Reference
30+
</a>
31+
</li>
32+
<li class="nav-item">
33+
<a class="nav-link" href="https://docs.scala-lang.org/scala3/">
34+
Docs
35+
</a>
36+
</li>
37+
<li class="nav-item">
38+
<a class="nav-link" href="https://github.com/lampepfl/dotty">
39+
<i class="fab fa-github"></i>
40+
</a>
41+
</li>
42+
</ul>
43+
</div>
44+
</nav>
45+
</header>
46+
<div class="container">
47+
<div class="scala-logo-container">
48+
<img src="images/dotty-logo-white.svg" alt="logo" />
49+
<div class="subtitle text-center">
50+
<h1 id="dotty" class="above-byline">Scala 3</h1>
51+
<p>A next-generation compiler for Scala</p>
52+
<p>(scroll down for more info)</p>
53+
</div>
54+
</div>
55+
</div>
56+
</section>
57+
<section class="page bg-blue bg-dark">
58+
<div class="container">
59+
60+
<h1 id="getting-started">Try Scala 3</h1>
61+
<p>There are multiple ways of <a href="https://docs.scala-lang.org/scala3/getting-started.html">getting started</a> with Scala 3.</p>
62+
<ol>
63+
<li>You can try Scala 3 in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</li>
64+
<li>If you already have sbt installed, you can <a href="#getting-started-with-a-project">create a Scala 3 project</a> and sbt will take care of the rest.</li>
65+
<li>You can install all necessary dependencies with <a href="https://get-coursier.io/">coursier</a> by running <code>cs setup</code>. You can also run <code>cs install scala3-compiler</code> or <code>cs install scala3-repl</code> to install command-line commands for the compiler and repl, correspondingly.</li>
66+
<li>You can <a href="#install">manually install Scala 3</a> on your computer.</li>
67+
</ol>
68+
69+
<h1 id="install">Install Scala 3</h1>
70+
<p>If you are a <strong>Mac</strong> user, you can install Scala 3 with <a href="https://brew.sh/">brew</a>:</p>
71+
<pre><code>brew install lampepfl/brew/dotty</code></pre>
72+
73+
<p>
74+
If you are a <strong>Linux</strong> or <strong>Windows</strong> user, as a prerequisite you need a JDK 8 or later properly installed on your system. The environment variable <code>JAVA_HOME</code> should point to your Java installation.<br/>
75+
For <strong>Windows</strong> users, we recommend using <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">the Windows subsystem for linux</a> or some other bash shell like <a href="https://gitforwindows.org/">git bash</a>.<br/>
76+
Then download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add the path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>.
77+
</p>
78+
79+
<p>Now you can compile Scala source code:</p>
80+
<pre><code>scalac hello.scala</code></pre>
81+
82+
<p>To start the REPL, run: <code>scala</code>.</p>
83+
84+
<h1 id="getting-started-with-a-project">Create a Scala 3 Project</h1>
85+
<p>The fastest way to create a new project in Scala 3 is using <a href="http://www.scala-sbt.org/">sbt (1.1.4+)</a>.</p>
86+
87+
<p>Create a Scala 3 project:</p>
88+
<pre><code>sbt new <a href="https://github.com/lampepfl/dotty.g8">lampepfl/dotty.g8</a></code></pre>
89+
90+
<p>Or a Scala 3 project that cross compiles with Scala 2:</p>
91+
<pre><code>sbt new <a href="https://github.com/lampepfl/dotty-cross.g8">lampepfl/dotty-cross.g8</a></code></pre>
92+
93+
<p>For documentation see the <a href="https://github.com/lampepfl/dotty-example-project">Scala 3 Example Project</a>.</p>
94+
95+
<h1 id="documentation">Learn more about Scala 3</h1>
96+
<p>You can find much more information about Scala 3 in ...</p>
97+
<ul>
98+
<li>... the <a href="https://docs.scala-lang.org/scala3/">Scala 3 documentation</a>,</li>
99+
<li>... the <a href="https://docs.scala-lang.org/scala3/book/introduction.html">Scala 3 book</a>,</li>
100+
<li>... the <a href="docs/index.html">Scala 3 reference docs</a>,</li>
101+
<li>... the <a href="https://docs.scala-lang.org/scala3/guides.html">Scala 3 guides</a>.</li>
102+
</ul>
103+
</div>
104+
</section>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ object Build {
16221622
"-skip-by-id:scala.runtime.MatchCase " +
16231623
"-skip-by-regex:.+\\.internal($|\\..+) " +
16241624
"-skip-by-regex:.+\\.impl($|\\..+) " +
1625-
"-comment-syntax wiki -siteroot scaladoc/scala3-docs -project-logo scaladoc/scala3-docs/logo.svg " +
1625+
"-comment-syntax wiki -siteroot docs -project-logo docs/logo.svg " +
16261626
"-external-mappings:.*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/ " +
16271627
"-social-links:github::https://github.com/lampepfl/dotty," +
16281628
"gitter::https://gitter.im/scala/scala," +

scaladoc/scala3-docs/blog

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)