Skip to content

Merge scala 2 and scala 3 themes and guides #2430

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 23 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
move scala 3 guides to common index
  • Loading branch information
bishabosha committed Jun 22, 2022
commit ac06c425218fdf2e269741d3c187d2876d63877d
2 changes: 0 additions & 2 deletions _data/doc-nav-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
submenu:
- title: "Guides & Overviews"
url: "/overviews/index.html"
- title: Scala 3 Guides
url: '/scala3/guides.html'
- title: Books
url: "/books.html"
- title: Scala FAQ
Expand Down
35 changes: 34 additions & 1 deletion _data/overviews.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@

- category: Scala 3 Deeper Dive
description: "Guides and overviews that introduce new concepts in Scala 3"
overviews:
- title: "Migration from Scala 2 to Scala 3"
by: Adrien Piquerez
icon: suitcase
root: "scala3/guides/"
url: "migration/compatibility-intro.html"
description: "Everything you need to know about compatibility and migration to Scala 3."
- title: Macros
by: Nicolas Stucki
icon: magic
root: "scala3/guides/"
url: "macros"
description: "A detailed tutorial to cover all the features involved in writing macros in Scala 3."
label-text: feature
- title: An Overview of TASTy
by: Alvin Alexander
icon: birthday-cake
root: "scala3/guides/"
url: "tasty-overview.html"
description: "An overview over the TASTy format aimed at end-users of the Scala language."
- title: "Scala 3 Contributing Guide"
by: Jamie Thompson, Anatolii Kmetiuk
icon: cogs
root: "scala3/guides/"
url: "contribution/contribution-intro.html"
description: "Guide to the Scala 3 Compiler and fixing an issue"
- title: Scaladoc
by: Krzysztof Romanowski, Aleksander Boruch-Gruszecki, Andrzej Ratajczak, Kacper Korban, Filip Zybała
icon: book
root: "scala3/guides/"
url: "scaladoc"
description: "Scala’s API documentation generation tool."
- category: Standard Library
description: "Guides and overviews covering the Scala standard library."
overviews:
Expand Down
13 changes: 9 additions & 4 deletions _layouts/overviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ <h2>{{ category.category }}</h2>
{% if category.description %}<p>{{ category.description }}</p>{% endif %}
<div class="card-group">
{% for overview in category.overviews %}
{% if overview.root %}
{% assign overviewroot = overview.root %}
{% else %}
{% assign overviewroot = 'overviews/' %}
{% endif %}
<div class="white-card">
<div class="card-wrap">
<div class="card-header">
Expand All @@ -52,8 +57,8 @@ <h2>{{ category.category }}</h2>
<div class="icon"><i class="fa fa-{{ overview.icon }}" aria-hidden="true"></i></div>
</div>
{% endif %}
{% capture originalOverviewUrl %}/overviews/{{ overview.url }}{% endcapture %}
{% capture translatedOverviewId %}/{{page.language}}/overviews/{{ overview.url | remove_first: '.html' }}{% endcapture %}
{% capture originalOverviewUrl %}/{{overviewroot}}{{ overview.url }}{% endcapture %}
{% capture translatedOverviewId %}/{{page.language}}/{{overviewroot}}{{ overview.url | remove_first: '.html' }}{% endcapture %}
{% assign translatedOverview = site.documents | where: 'id', translatedOverviewId | first %}
<a href="{{ translatedOverview.url | default: originalOverviewUrl }}"><h3>{{ overview.title }}</h3></a>
</div>
Expand All @@ -65,8 +70,8 @@ <h2>{{ category.category }}</h2>
<strong>Contents</strong>
<ul class="subdocs">
{% for doc in overview.subdocs %}
{% capture originalDocUrl %}/overviews/{{ doc.url }}{% endcapture %}
{% capture translatedDocId %}/{{page.language}}/overviews/{{ doc.url | remove_first: '.html' }}{% endcapture %}
{% capture originalDocUrl %}/{{overviewroot}}{{ doc.url }}{% endcapture %}
{% capture translatedDocId %}/{{page.language}}/{{overviewroot}}{{ doc.url | remove_first: '.html' }}{% endcapture %}
{% assign translatedDoc = site.documents | where: 'id', translatedDocId | first %}
<li><a href="{{ translatedDoc.url | default: originalDocUrl }}">{{ doc.title }}</a></li>
{% endfor %}
Expand Down
2 changes: 2 additions & 0 deletions _overviews/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ partof: overviews
title: Guides and Overviews
languages: [ja, zh-cn, ru, uk]
permalink: /overviews/:title.html
redirect_from:
- /scala3/guides.html
---

<!-- Auto generated from _data/overviews.yml -->
45 changes: 0 additions & 45 deletions scala3/guides.md

This file was deleted.