Skip to content

Commit e33b6c6

Browse files
authored
Merge pull request #2414 from scala/add-newcomers-articles
Improve getting-started experience for Java newcomers and OSS contributors
2 parents 252e801 + 520c8fe commit e33b6c6

20 files changed

+360
-125
lines changed

_config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ scala-212-version: 2.12.16
2020
scala-3-version: 3.1.3
2121

2222
collections:
23-
contribute_resources:
24-
output: false
2523
style:
2624
output: true
2725
overviews:
@@ -148,7 +146,7 @@ defaults:
148146
path: "_overviews/contribute"
149147
values:
150148
partof: scala-contribution
151-
overview-name: Contributing to Scala
149+
overview-name: Contributing to Scala's OSS Ecosystem
152150
layout: multipage-overview
153151
permalink: "/contribute/:title.html"
154152
-

_contribute_resources/1-documentation.md

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

_contribute_resources/2-bug-fixes.md

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

_contribute_resources/3-code-reviews.md

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

_contribute_resources/4-core-libraries.md

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

_contribute_resources/5-ide-and-build-tools.md

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

_contribute_resources/6-compiler-language.md

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

_getting-started/index.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ partof: getting-started
55
languages: [fr, ja, uk]
66
includeTOC: true
77

8+
newcomer_resources:
9+
- title: Are You Coming From Java?
10+
description: What you should know to get to speed with Scala after your initial setup.
11+
icon: "fa fa-coffee"
12+
link: /tutorials/scala-for-java-programmers.html
13+
- title: Scala in the Browser
14+
description: >
15+
To start experimenting with Scala right away, use "Scastie" in your browser.
16+
icon: "fa fa-cloud"
17+
link: https://scastie.scala-lang.org/pEBYc5VMT02wAGaDrfLnyw
18+
819
redirect_from:
920
- /getting-started.html
1021
- /scala3/getting-started.html # we deleted the scala 3 version of this page
@@ -19,14 +30,9 @@ The instructions below cover both Scala 2 and Scala 3.
1930
{% endaltDetails %}
2031
</div>
2132

22-
## Try Scala without installing anything
23-
24-
To start experimenting with Scala right away, use <a href="https://scastie.scala-lang.org/pEBYc5VMT02wAGaDrfLnyw" target="_blank">“Scastie” in your browser</a>.
25-
_Scastie_ is an online “playground” where you can experiment with Scala examples to see how things work, with access to all Scala compilers and published libraries.
33+
## Resources For Newcomers
2634

27-
> Scastie supports both Scala 2 and Scala 3, but it defaults
28-
> to Scala 3. If you are looking for a Scala 2 snippet to play with,
29-
> [click here](https://scastie.scala-lang.org/MHc7C9iiTbGfeSAvg8CKAA).
35+
{% include inner-documentation-sections.html links=page.newcomer_resources %}
3036

3137
## Install Scala on your computer
3238

_getting-started/sbt-track/getting-started-with-scala-and-sbt-on-the-command-line.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" %
9393
Here, `libraryDependencies` is a set of dependencies, and by using `+=`,
9494
we're adding the [scala-parser-combinators](https://github.com/scala/scala-parser-combinators) dependency to the set of dependencies that sbt will go
9595
and fetch when it starts up. Now, in any Scala file, you can import classes,
96-
objects, etc, from scala-parser-combinators with a regular import.
96+
objects, etc, from `scala-parser-combinators` with a regular import.
9797

9898
You can find more published libraries on
9999
[Scaladex](https://index.scala-lang.org/), the Scala library index, where you
100100
can also copy the above dependency information for pasting into your `build.sbt`
101101
file.
102102

103+
> **Note for Java Libraries:** For a regular Java library, you should only use one percent (`%`) between the
104+
> organization name and artifact name. Double percent (`%%`) is a specialisation for Scala libraries.
105+
> You can learn more about the reason for this in the [sbt documentation][sbt-docs-lib-dependencies].
106+
103107
## Next steps
104108

105109
Continue to the next tutorial in the _getting started with sbt_ series, and learn about [testing Scala code with sbt in the command line](testing-scala-with-sbt-on-the-command-line.html).
@@ -109,3 +113,5 @@ Continue to the next tutorial in the _getting started with sbt_ series, and lear
109113
- Continue learning Scala interactively online on
110114
[Scala Exercises](https://www.scala-exercises.org/scala_tutorial).
111115
- Learn about Scala's features in bite-sized pieces by stepping through our [Tour of Scala]({{ site.baseurl }}/tour/tour-of-scala.html).
116+
117+
[sbt-docs-lib-dependencies]: https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html#Getting+the+right+Scala+version+with

_includes/column-list-of-items.html

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

_includes/documentation-sections.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="section">
44
<h2 class="frontpage">{{ section.title }}</h2>
55
{% for link in section.links %}
6-
<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}" class="doc-item">
6+
<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}" class="doc-item doc-item-link">
77
<div class="doc-item-header">
88
<i class="{{link.icon}}"></i>
99
<h5>{{link.title}}</h5>

_includes/headertop.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<meta name="msapplication-TileColor" content="#15a9ce">
4747
<meta name="theme-color" content="#ffffff">
4848

49-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
49+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
5050

5151
<!-- Custom stylesheet -->
5252
<link href="{{ site.baseurl }}/resources/css/unslider-dots.css" rel="stylesheet" type="text/css">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% comment %}
2+
Layouts using this include should pass an include variable called 'links' referencing a list carrying the data
3+
{% endcomment %}
4+
5+
<div class="documentation">
6+
{% for link in include.links %}
7+
<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}"
8+
class="doc-item doc-item-link">
9+
<div class="doc-item-header">
10+
<i class="{{link.icon}}"></i>
11+
<h4>{{link.title}}</h4>
12+
</div>
13+
<div class="doc-item-main">
14+
<p>{{link.description}}</p>
15+
</div>
16+
</a>
17+
{% endfor %}
18+
</div>

_includes/sidebar-toc-multipage-overview.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% assign pagetype = page.type %}
22
<div class="content-nav">
33
<div class="inner-box sidebar-toc-wrapper {% if pagetype %}book{% endif %}" style="">
4-
<h5 class="contents">Contents</h5>
4+
<h5 class="contents">Contents</h5>
55
{% if pagetype %}
66
<div class="inner-toc book" id="sidebar-toc">
77
{% else %}
@@ -10,11 +10,11 @@ <h5 class="contents">Contents</h5>
1010
<ul>
1111
{% assign sorted = site[page.collection] | sort: 'num' %}
1212
{% for pg in sorted %}
13-
{% if pg.num == page.num %}
14-
{% capture toc %}
15-
<div id="toc"></div>
16-
{% endcapture %}
17-
{% endif %}
13+
{% capture toc %}
14+
{% if pg.num == page.num %}
15+
<div id="toc"></div>
16+
{% endif %}
17+
{% endcapture %}
1818

1919
{% if pg.num and (page.partof == pg.partof) %}
2020
{% if page.language %} <!-- if page is a translation, get the translated title -->
@@ -23,7 +23,7 @@ <h5 class="contents">Contents</h5>
2323
{% for lpg in site.[page.language] %}
2424
{% if lpg.id == localizedId %}
2525
<li><a {% if page.title == lpg.title %}class="active"{% endif %} href="/{{ site.baseurl }}{{ page.language }}{{ pg.url }}">{{ lpg.title }}</a>
26-
{{ toc }}</li>
26+
{{ toc }}</li>
2727
{% endif %}
2828
{% endfor %}
2929
{% else %} <!-- this must be English, so get the other documents' titles -->
@@ -44,8 +44,8 @@ <h5 class="contents">Contents</h5>
4444
{% for l in page.languages %}
4545
{% capture intermediate %}{{ page.url }}{% endcapture %}
4646
{% capture rootTutorialURL %}{{ intermediate | remove_first: '/' }}{% endcapture %}
47-
{% assign lang = site.data.languages[l] %}
48-
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
47+
{% assign lang = site.data.languages[l] %}
48+
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
4949
{% endfor %}
5050
</ul>
5151
{% elsif page.language %}
@@ -59,8 +59,8 @@ <h5 class="contents">Contents</h5>
5959
{% endfor %}
6060
</ul>
6161
{% endif %}
62-
</div>
63-
<hr>
64-
<div class="help-us"><a href="https://github.com/scala/docs.scala-lang/blob/main/{% if page.collection %}{{ page.relative_path }}{% else %}{{ page.path }}{% endif %}"><i class="fa fa-pencil" aria-hidden="true"></i> Problem with this page?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please help us fix it!</a></div>
65-
</div>
62+
</div>
63+
<hr>
64+
<div class="help-us"><a href="https://github.com/scala/docs.scala-lang/blob/main/{% if page.collection %}{{ page.relative_path }}{% else %}{{ page.path }}{% endif %}"><i class="fa fa-pencil" aria-hidden="true"></i> Problem with this page?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please help us fix it!</a></div>
65+
</div>
6666
</div>

0 commit comments

Comments
 (0)