Skip to content

Copy content from dotty.epfl.ch into docs.scala-lang.org #2112

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 6 commits into from
Jul 14, 2021
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
14 changes: 13 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ collections:
getting-started:
output: true
permalink: /:collection/:path.html
scala3-reference: # not really a collection, but this is the only way I found to be able to generate the navigation bar on the right
output: true
ja: # Japanese translations
output: true
permalink: /:collection/:path.html
Expand Down Expand Up @@ -123,6 +125,16 @@ defaults:
overview-name: "Macros in Scala 3"
layout: multipage-overview
permalink: "/scala3/guides/macros/:title.html"
-
scope:
path: "_scala3-reference"
values:
scala3: true
partof: scala3-reference
type: section
overview-name: "Scala 3 Language Reference"
layout: multipage-overview
permalink: "/scala3/reference/:path.html"
-
scope:
path: "scala3"
Expand All @@ -133,7 +145,7 @@ defaults:
highlighter: rouge
permalink: /:categories/:title.html:output_ext
baseurl:
scala3ref: "https://dotty.epfl.ch/docs/reference"
scala3ref: "/scala3/reference"
exclude: ["vendor"]
plugins:
- jekyll-redirect-from
Expand Down
2 changes: 1 addition & 1 deletion _data/scala3-doc-nav-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
- title: Migrate
url: "/scala3/guides/migration/compatibility-intro.html"
- title: Reference
url: "https://dotty.epfl.ch/docs/reference/overview.html"
url: "/scala3/reference/overview.html"
- title: API
url: "https://dotty.epfl.ch/api/index.html"
2 changes: 1 addition & 1 deletion _includes/sidebar-toc-multipage-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h5 class="contents">Contents</h5>
{% endif %}

<ul>
{% assign sorted = site.overviews | sort: 'num' %}
{% assign sorted = site[page.collection] | sort: 'num' %}
{% for pg in sorted %}
{% if pg.num == page.num %}
{% capture toc %}
Expand Down
2 changes: 1 addition & 1 deletion _ja/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ scala3-sections:
- title: "Language Reference"
description: "Scala 3 の言語仕様"
icon: "fa fa-book"
link: https://dotty.epfl.ch/docs/reference/overview.html
link: /scala3/reference/overview.html

scala2-sections:

Expand Down
2 changes: 1 addition & 1 deletion _ja/scala3/contribute-to-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Scala 3 の高品質なドキュメンテーションを作るためのいくつ


## Scala 3 Language Reference
The [Dotty reference](https://dotty.epfl.ch/docs/reference/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。
The [Dotty reference](/scala3/reference/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。

- [Sources](https://github.com/lampepfl/dotty/tree/master/docs/docs/reference)
- [Issues](https://github.com/lampepfl/dotty/issues)
Expand Down
2 changes: 1 addition & 1 deletion _ja/scala3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ sections:
- title: "Language Reference"
description: "Scala 3 の言語仕様"
icon: "fa fa-book"
link: https://dotty.epfl.ch/docs/reference/overview.html
link: /scala3/reference/overview.html
---
2 changes: 1 addition & 1 deletion _ja/scala3/new-in-scala3.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Scala 3 のメタプログラミングについてもっと知りたいかたは
[creator]: {{ site.scala3ref }}/other-new-features/creator-applications.html
[migration]: {% link _overviews/scala3-migration/compatibility-intro.md %}

[implicits]: {{ site.scala3ref }}/contextual/motivation.html
[implicits]: {{ site.scala3ref }}/contextual.html
[contextual-using]: {{ site.scala3ref }}/contextual/using-clauses.html
[contextual-givens]: {{ site.scala3ref }}/contextual/givens.html
[contextual-extension]: {{ site.scala3ref }}/contextual/extension-methods.html
Expand Down
4 changes: 2 additions & 2 deletions _overviews/FAQ/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ and a [summary with practical differences](https://tpolecat.github.io/2014/06/09

Note that in **Scala 3** the differences are fewer;
for example, they will be able to
[accept implicit parameters](https://dotty.epfl.ch/docs/reference/contextual/context-functions.html)
as well as [type parameters](https://dotty.epfl.ch/docs/reference/new-types/polymorphic-function-types.html).
[accept implicit parameters](/scala3/reference/contextual/context-functions.html)
as well as [type parameters](/scala3/reference/new-types/polymorphic-function-types.html).

Nevertheless, it is still recommended to use methods most of the time,
unless you absolutely need a function. And, thanks to
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/ca-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ A few more advanced topics aren’t covered here, including:
Those topics are discussed in detail in the [Reference documentation][ref].


[ref]: {{ site.scala3ref }}/contextual/motivation.html
[ref]: {{ site.scala3ref }}/contextual.html
4 changes: 2 additions & 2 deletions _overviews/scala3-book/interacting-with-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
title: Interacting with Java
type: chapter
description: This page demonstrates how Scala code can interact with Java, and how Java code can interact with Scala code.
num: 70
previous-page: scala-tools
num: 72
previous-page: tools-worksheets
next-page: scala-for-java-devs
---

Expand Down
4 changes: 2 additions & 2 deletions _overviews/scala3-book/scala-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ As Heather Miller states, Scala is considered to be a [strong, statically-typed
- You can refactor your code with confidence
- Method type declarations tell readers what the method does, and help serve as documentation
- Scalability and maintainability: types help ensure correctness across arbitrarily large applications and development teams
- Strong typing in combination with excellent inference enables mechanisms like [contextual abstraction]({{ site.scala3ref }}/contextual/motivation.html) that allows you to omit boilerplate code. Often, this boilerplate code can be inferred by the compiler, based on type definitions and a given context.
- Strong typing in combination with excellent inference enables mechanisms like [contextual abstraction]({{ site.scala3ref }}/contextual.html) that allows you to omit boilerplate code. Often, this boilerplate code can be inferred by the compiler, based on type definitions and a given context.

{% comment %}
In that list:
Expand Down Expand Up @@ -239,7 +239,7 @@ In Scala, a context parameter directly leads to an inferred argument term that c
Use cases for this concept include implementing [type classes]({% link _overviews/scala3-book/ca-type-classes.md %}), establishing context, dependency injection, expressing capabilities, computing new types, and proving relationships between them.

Scala 3 makes this process more clear than ever before.
Read about contextual abstractions in the [Reference documentation]({{ site.scala3ref }}/contextual/motivation.html).
Read about contextual abstractions in the [Reference documentation]({{ site.scala3ref }}/contextual.html).


### Client &amp; server
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-java-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Scala for Java Developers
type: chapter
description: This page is for Java developers who are interested in learning about Scala 3.
num: 71
num: 73
previous-page: interacting-with-java
next-page: scala-for-javascript-devs
---
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-javascript-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Scala for JavaScript Developers
type: chapter
description: This chapter provides an introduction to Scala 3 for JavaScript developers
num: 72
num: 74
previous-page: scala-for-java-devs
next-page: scala-for-python-devs
---
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-python-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Scala for Python Developers
type: chapter
description: This page is for Python developers who are interested in learning about Scala 3.
num: 73
num: 75
previous-page: scala-for-javascript-devs
next-page:
---
Expand Down
Loading