Skip to content

Migrate contribute section from scala-lang to a guide #2350

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 220 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
9ff6a34
Pushing uncommitted footprint
heathermiller May 3, 2012
fc99948
Some work on the contribute section
ingoem Sep 27, 2012
02337f4
Add partest guide
ingoem Sep 27, 2012
9ea42c1
first 1.5 steps of the hacker guide
xeno-by Mar 1, 2013
a2eb30e
"Contribute" landing page
VladUreche Mar 1, 2013
b09e5f1
1.5 more sections
xeno-by Mar 1, 2013
ca316b6
Merge branch 'master' of github.com:scala/scala-lang
xeno-by Mar 1, 2013
59c99c1
tentative fin
xeno-by Mar 1, 2013
a541a62
polishing the hacker guide
xeno-by Mar 1, 2013
edc6f15
removes the git guide - it's been subsumed by the hacker's guide
xeno-by Mar 1, 2013
ca55cb4
removes the workflow page - it's been subsumed by the hacker's guide
xeno-by Mar 1, 2013
de59612
Fixing issues with images, formatting fixups, moving maintainers list…
heathermiller Mar 3, 2013
42987dd
Fixes to the wording in the hacker guide.
heathermiller Mar 3, 2013
2ce31f9
Continuing to tweak the hacker guide, and to add info where needed. R…
heathermiller Mar 3, 2013
023f0b0
Final tweaks to the hacker guide. Mostly wording
heathermiller Mar 5, 2013
36ce309
Fixed a build error
sjrd Mar 7, 2013
3a415b7
First shot at a 'community tickets' feed fetched from JIRA.
sjrd Mar 7, 2013
af5a53c
Added a dynamic pager in the community tickets feed.
sjrd Mar 8, 2013
f317bfc
Bug reporting guide.
Apr 19, 2013
fe39e12
contribute -> get-involved
manojo Apr 23, 2013
ab597ab
Going back to having a 'Contribute' section
heathermiller May 30, 2013
8559dda
Going back to having a 'Contribute' section, take 2
heathermiller May 30, 2013
96c6854
Making contribute page full width
heathermiller Jun 5, 2013
2ddf889
Added hall of fame of May 2013.
sjrd Jun 6, 2013
81e5474
3-column layout for hall of fame pages.
sjrd Jun 6, 2013
5a8dd18
Added namin in EPFL people.
sjrd Jun 6, 2013
5056003
Styling contents and other cleanups
heathermiller Jun 7, 2013
43b72d9
Formatting fix to hackers guide
heathermiller Jun 8, 2013
05854a1
Moving community tickets back to contribute section
heathermiller Jul 12, 2013
9cd49cd
Hall of fame June 2013.
sjrd Jul 12, 2013
24ee607
Moved community tickets to a separate page.
sjrd Jul 15, 2013
8b3d91c
Moved contributing pages around.
sjrd Jul 15, 2013
22dc808
A bit of rewording on the contribute page.
sjrd Jul 17, 2013
684bb8b
Dropped 3 boxes on the Contribute guide.
sjrd Jul 18, 2013
13462b9
Moved the contribute intro text to contribute/.
sjrd Jul 18, 2013
966a0f2
Removing double title on the hall of fame
heathermiller Jul 30, 2013
688d556
Add section “Test” and “Merge”, rename “Discuss” to “Review”
soc Jul 30, 2013
29705fc
minor copyediting to hacker guide
SethTisue Jul 31, 2013
8efe137
Merge pull request #95 from SethTisue/hacker-guide-tweaks
sjrd Jul 31, 2013
50d5041
fix links in hacker guide and various typos.
gourlaysama Jul 31, 2013
f053d6a
Merge pull request #98 from gourlaysama/fix/typos
heathermiller Jul 31, 2013
ac890ec
Make hacker-guide valid.
relrod Aug 1, 2013
38ef7cf
Add hall of fame for July and August 2013.
sjrd Sep 30, 2013
1fad035
Add hall of fame for 2013-09.
sjrd Oct 10, 2013
9b709e0
Update hacker-guide.md
AndreVanDelft Jan 6, 2014
071e23e
Merge pull request #147 from AndreVanDelft/patch-1
heathermiller Jan 6, 2014
6f80442
Update hacker guide: add more info, fix broken links.
folone Jun 25, 2014
a076f43
Address the feedback.
folone Jun 26, 2014
9373b9d
Merge pull request #212 from folone/update-hacker-guide
heathermiller Jun 26, 2014
8f63cd0
Fix more references to spec
adriaanm Jul 7, 2014
e4ad4ef
Merge pull request #226 from adriaanm/master
sjrd Jul 7, 2014
afc73aa
Hall of fame Auguest 2014.
sjrd Sep 29, 2014
d4630ea
Add 2014 scala-fame data
fsalvi Oct 24, 2014
bd730a6
Add 2013 scala-fame data
fsalvi Oct 24, 2014
3d71e5b
Add scala-fame data
fsalvi Nov 3, 2014
84d53a9
Add scala-fame data
fsalvi Dec 3, 2014
def0d83
Removed PHP issues page in favor of direct JIRA queries.
dickwall Jan 12, 2015
76fcdfa
Add scala-fame data
fsalvi Jan 14, 2015
fd4cf44
Add scaladoc contribution page and link up.
dickwall Jan 14, 2015
b049734
Corrected JIRA search URL for compiler bugs.
dickwall Jan 27, 2015
28b1a79
Merge pull request #253 from dickwall/doc/communitytickets
sjrd Jan 27, 2015
b53c6bd
Wording tweaks
heathermiller Jan 29, 2015
b27128f
Some reorganization and tweaks
heathermiller Jan 29, 2015
c605c2e
Merge pull request #257 from dickwall/doc/contributedoc
heathermiller Jan 29, 2015
66f39d2
Fix the Forking url and grammatical consistency
JustinPihony Feb 2, 2015
75efc9d
Merge pull request #262 from JustinPihony/scaladoc/updatecontrib
heathermiller Feb 2, 2015
f2a174c
Correct a couple of spelling typos on contribution pages.
dickwall Feb 2, 2015
720507a
Merge pull request #263 from dickwall/doc/fixtyposcontrib
heathermiller Feb 2, 2015
db2a14f
Add u to docmentation typo
JustinPihony Feb 4, 2015
4080865
Merge pull request #264 from JustinPihony/scaladoc/updatecontrib
heathermiller Feb 4, 2015
eb1e3cb
Update contributor pages for bugs/issues - provide issue checklist
dickwall Feb 9, 2015
0083e20
Alter when documentation/bug fix scala-internals postings are recomme…
dickwall Feb 10, 2015
d7c254b
Correct scala-internals link and remove missing resource links.
dickwall Feb 10, 2015
bdacdf6
Merge pull request #268 from scala/doc/bugcontrib
dickwall Feb 10, 2015
a4fb06f
Add scala-fame data
fsalvi Feb 16, 2015
db78065
Re-org and simplify contribution section pages.
dickwall Feb 17, 2015
090c9de
Remove wiki info, use scala-lang.org.
dickwall Feb 17, 2015
b8fd97d
Merge pull request #276 from scala/fix/contributereview
dickwall Feb 17, 2015
e172523
Add IDEs and Build Tools page
dickwall Feb 18, 2015
391caec
Respond to review comments - correct link, reorder projects
dickwall Mar 10, 2015
78759cd
Tweak the all community bugs link
dickwall Mar 11, 2015
84da163
Add fix me links and core lib page.
dickwall Mar 17, 2015
66c5272
Add a missing paragraph opener on tools.md
dickwall Mar 17, 2015
a2d1817
Merge pull request #285 from scala/fix/tools-page
dickwall Mar 17, 2015
cde252c
Fix intra-page links for main markdown engine.
dickwall Mar 17, 2015
5d944e7
Merge pull request #286 from scala/fix/contribute-markdown-links
dickwall Mar 17, 2015
70673bb
Remove extra _ in fix-page link.
dickwall Mar 17, 2015
e73e5ad
Merge pull request #287 from scala/fix/fix-page-link
dickwall Mar 17, 2015
fa3402a
Fix documentation page intra-link.
dickwall Mar 17, 2015
380c4bf
Merge pull request #288 from scala/fix/documentation-contrib
dickwall Mar 17, 2015
fc02b4d
Add contribute PR review page to /contribute
dickwall Mar 23, 2015
77cd3f5
Incorporate comments, reduce wordiness
dickwall Mar 24, 2015
3c9d4cd
Add scala-fame data
fsalvi Apr 14, 2015
4bada26
Fix transposition of github.scala.com.
dickwall Apr 20, 2015
5b4b706
Merge pull request #290 from scala/doc/contribute-reviews
dickwall Apr 20, 2015
57b4392
phase out old GitHub wiki pages
SethTisue Jul 13, 2015
2fed551
Merge pull request #315 from SethTisue/no-more-github-wiki
SethTisue Jul 13, 2015
6a53d06
hacker's guide: replace out-of-date reviewer list with link
SethTisue Jul 18, 2015
b794365
Merge pull request #319 from SethTisue/link-to-current-maintainers-list
heathermiller Jul 18, 2015
23f6274
SI-9495 Add note about configuring Ant for HTTP proxies
retronym Sep 30, 2015
127aaf6
Merge pull request #333 from scala/ticket/9495
SethTisue Sep 30, 2015
4d8f053
fix slightly malformed Markdown
SethTisue Sep 30, 2015
50b14af
SI-9501 add prominent links to relevant docs in main Scala repo
SethTisue Oct 6, 2015
9e311d3
Merge pull request #336 from SethTisue/add-links-near-start
SethTisue Oct 7, 2015
0feb67a
fix typo
SethTisue Nov 6, 2015
c80d070
October 2015 hall of fame
SethTisue Nov 6, 2015
761af81
tweak Hall of Fame page
SethTisue Nov 6, 2015
3ebb301
Merge pull request #353 from SethTisue/hall-of-fame-tweak
SethTisue Nov 6, 2015
7a039ae
tiny fix
SethTisue Nov 10, 2015
749a690
hall of fame: 2.12.x is default branch now
SethTisue Dec 4, 2015
f0fb46c
November 2015 contributors hall of fame
SethTisue Dec 4, 2015
fd9efb3
Merge pull request #364 from SethTisue/hall-of-fame-nov-215
SethTisue Dec 4, 2015
f928c82
fix bad Markdown
SethTisue Dec 17, 2015
42986b1
Merge pull request #379 from SethTisue/fix-bad-markdown
SethTisue Dec 17, 2015
719edc3
add text about community libraries, Scala community build
SethTisue Dec 17, 2015
eeee725
Code of Conduct page, relocated from docs site
SethTisue Dec 17, 2015
cc3d461
tweak wording of community build section
SethTisue Dec 18, 2015
9a9c6e7
Merge pull request #381 from SethTisue/tout-community-build
heathermiller Dec 18, 2015
856fc9c
retire the Scala Contributor Hall of Fame
SethTisue Jan 4, 2016
51e1aa8
Merge pull request #387 from SethTisue/no-more-hall-of-fame
sjrd Jan 5, 2016
76fa6b9
Typesafe -> Lightbend in a bunch of places
SethTisue Feb 24, 2016
cb47977
Merge pull request #416 from SethTisue/light-saber-type-fender
SethTisue Feb 24, 2016
55dfcf6
Replace references to ant with corresponding sbt references
chaselal Jun 7, 2016
5532eb4
Changes per PR feedback
chaselal Jun 8, 2016
1ea529f
Correct misleading instructions for publishing a local Scala version
chaselal Jun 14, 2016
2a94e25
Update Ensime's contributing and readme page
bertzzie Sep 14, 2016
a41edfc
Implement some review feedback, some polish of my own
adriaanm Oct 26, 2016
ed07235
Merge pull request #504 from adriaanm/chaselal-update-hacker-guide
SethTisue Oct 26, 2016
6a5ddf9
fix Github -> GitHub
SethTisue Nov 8, 2016
78590ba
recommend sbt, not Activator
SethTisue Nov 15, 2016
891183e
fix a lot of broken links
jarrodu Nov 16, 2016
bca634e
Merge pull request #533 from jarrodwb/fix-links
SethTisue Nov 16, 2016
17179d3
Merge pull request #530 from SethTisue/sbt-not-activator
SethTisue Nov 16, 2016
ffe3a69
fix blank alt tags
jarrodu Nov 17, 2016
c46edc1
Fix formatting problems in hacker guide
ashawley Nov 19, 2016
c27f49c
fix miscellaneous links
jarrodu Nov 20, 2016
378fa3d
Merge pull request #544 from jarrodwb/broken-links
SethTisue Nov 21, 2016
f2b3a20
2.11 -> 2.12 in some more places
SethTisue Dec 7, 2016
0371cb8
Merge pull request #572 from SethTisue/more-version-bumps
SethTisue Dec 7, 2016
1a25805
First migration of content pages to new content layout - First migrat…
Feb 8, 2017
b58955f
Short items list for the contribute subpages
Feb 8, 2017
0aa2f7f
Adding code of conduct
Feb 9, 2017
1a423d1
Merge pull request #33 from 47deg/sl9-internal-pages-implementation
Feb 9, 2017
32684ba
Update bug reporting links
janekdb Jun 20, 2017
7390eec
Add scalacheck tips and note removal of partest
janekdb Jun 22, 2017
6f05619
Merge pull request #671 from janekdb/topic/scalacheck-run-one
travissarles Jun 22, 2017
2434ec3
Merge branch 'master' of https://github.com/scala/scala-lang into exp…
travissarles Jun 26, 2017
98cab4f
Merge pull request #670 from janekdb/topic/bug-reporting-link
heathermiller Jul 6, 2017
290816e
Dealing with conflicts
heathermiller Jul 13, 2017
72f6b45
Merge pull request #679 from scala/pr/667
heathermiller Jul 13, 2017
c8305a9
Get rid of some of the permalinks that are breaking everything
heathermiller Jul 13, 2017
fbca9ca
Bug reporting guide link fixes
heathermiller Jul 14, 2017
e2f7c07
Removing some mentions of scala-internals
heathermiller Jul 14, 2017
5c3fbae
Missing whitespace
heathermiller Jul 14, 2017
d1d0f26
fix or remove links to wiki
SethTisue Jul 19, 2017
dc38fbc
Merge pull request #711 from SethTisue/wiki-is-dead
SethTisue Jul 24, 2017
81a9902
scala.github.com -> docs.scala-lang
SethTisue Aug 10, 2017
287b50a
Fix broken links of https://scala-lang.org/contribute/#contribute.
jiminhsieh Aug 17, 2017
05fc415
Merge pull request #729 from jiminhsieh/ticket/#727
heathermiller Aug 17, 2017
18f49fc
More link fixes
heathermiller Aug 17, 2017
aaf513b
Extend partest guide with sbt and mention batch script removals
janekdb Sep 6, 2017
48e43e8
fix typo
SethTisue Sep 6, 2017
6f2ca77
Fix links to Hacker guide
Philippus Nov 15, 2017
3db9bb5
Add missing space
Philippus Jan 27, 2018
725800e
Fix links
Philippus Jan 27, 2018
56abdcb
Link to GitHub instead of JIRA
Philippus Jan 27, 2018
46fc7ea
Reword and link to GitHub instead of JIRA
Philippus Jan 27, 2018
381b641
Link to GitHub instead of JIRA
Philippus Jan 27, 2018
74ce081
Fix ironically broken link
Philippus Jan 27, 2018
832e674
Link to GitHub instead of JIRA
Philippus Jan 27, 2018
e4f39bf
Fix Scalariform section
Philippus Jan 27, 2018
4a9c5f0
Remove Scalap
Philippus Jan 27, 2018
0dc0f0d
Link to GitHub instead of JIRA
Philippus Jan 27, 2018
5ad09fd
Remove link to 'Actors Migration Kit'
Philippus Jan 27, 2018
1b4d548
Replace references to 'JIRA' with 'GitHub'
Philippus Jan 27, 2018
7666532
Remove 'Community Tickets' section almost completely
Philippus Jan 27, 2018
0dda547
Fix links to Mailing Lists
Philippus Jan 28, 2018
2f7d9fb
Fix broken links
Philippus Jan 28, 2018
f00b6f3
Update links for ENSIME
Philippus Jan 28, 2018
5d99628
Remove link to not-existing page
Philippus Jan 28, 2018
d13b13b
Update DBuild links
Philippus Jan 28, 2018
2fc39af
Merge branch 'master' into remove-links-to-jira
propensive Feb 14, 2018
df0a9ab
Update broken/outdated links
Philippus Feb 14, 2018
b2151d9
Merge pull request #838 from Philippus/fix-more-broken-links
SethTisue Feb 14, 2018
d0fc35c
s/username/user-name/ to please htmlproofer
OlivierBlanvillain Feb 16, 2018
0846496
Fix contribute link
OlivierBlanvillain Feb 16, 2018
b8524d6
Merge pull request #840 from OlivierBlanvillain/cleanup-links
SethTisue Feb 16, 2018
44032b5
update spec links and advisements
SethTisue Jun 19, 2019
abc232e
Merge pull request #1050 from SethTisue/spec-links
SethTisue Jun 19, 2019
4643f12
Point the hacker guide to 2.13
dwijnand Jul 9, 2019
a8b0a77
Merge pull request #1056 from scala/2.13-hacker
SethTisue Jul 9, 2019
4a881b1
renamed community-builds repo to community-build
SethTisue Oct 10, 2019
ef84a93
ENSIME is dead, Abide is dead (#1083)
SethTisue Oct 12, 2019
7fbd26d
fix dead links
SethTisue Jan 28, 2020
905ee66
fix dead links (#1108)
dwijnand Jan 28, 2020
cd0e4fa
fix some 404s
SethTisue Jan 29, 2020
398d1aa
Merge pull request #1109 from SethTisue/fix-more-bad-links
dwijnand Jan 29, 2020
ae348d2
Replace references to SLIP with SIP
Philippus Jan 30, 2020
6342df9
Reword bit about significant changes
Philippus Feb 1, 2020
fa1fc2b
remove incorrect bit about partest (#1163)
SethTisue Oct 13, 2020
545f84c
Use HTTPS for links
Marcono1234 Dec 14, 2020
b129513
Use correct capitalization for "GitHub"
Marcono1234 Dec 15, 2020
cd127dc
Merge pull request #1194 from Marcono1234/marcono1234/https-links
SethTisue Dec 15, 2020
b91365a
Add the Inclusive Language Guide.
sjrd Nov 24, 2021
7756c54
Discord is now our main chat platform
SethTisue Dec 15, 2021
79597c8
Merge pull request #1312 from SethTisue/hello-discord
SethTisue Dec 15, 2021
532dbc3
enable collection contribute_resources
bishabosha Mar 21, 2022
d9c44eb
prepare for move files
bishabosha Mar 21, 2022
3073565
move contribute files
bishabosha Mar 21, 2022
db3d07e
convert to multipage overview
bishabosha Mar 21, 2022
c692ad3
migrate urls to /overviews/contribute
bishabosha Mar 21, 2022
ef8f171
modernise the content somewhat
bishabosha Mar 21, 2022
b32fe56
add new page - Add New Guides/Tutorials
bishabosha Mar 21, 2022
4b34e7f
integrate guide with the site
bishabosha Mar 21, 2022
302bfbf
revert to /contribute/ urls
bishabosha Mar 22, 2022
573e494
use jekyll link tag to render internal links
bishabosha Mar 22, 2022
7de6290
add back Scoverage as a project in need
bishabosha Mar 23, 2022
e2a41dc
use more accessible language in Add New Guides/Tutorials
bishabosha Mar 23, 2022
d8e9d2e
enhance contribute intro
bishabosha Mar 23, 2022
add60f3
final proof read
bishabosha Mar 30, 2022
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For more details on the Docker option, see [this issue](https://github.com/scala

## Contributing ##

Please have a look at [https://docs.scala-lang.org/contribute.html](https://docs.scala-lang.org/contribute.html) before making a contribution.
Please have a look at [Add New Guides/Tutorials](https://docs.scala-lang.org/overviews/contribute/add-guides.html) before making a contribution.
This document gives an overview of the type of documentation contained within the Scala Documentation repository and the repository's structure.

Small changes, or corrected typos will generally be pulled in right away. Large changes, like the addition of new documents, or the rewriting of
Expand Down
2 changes: 1 addition & 1 deletion _contribute_resources/1-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ title: Documentation
link: /overviews/contribute/documentation.html
icon: fa fa-book
---
[Scaladoc (API)](/overviews/contribute/scala-standard-library-api-documentation.html), [docs.scala-lang.org](/contribute.html) and [scala-lang.org](https://github.com/scala/scala-lang).
[Scaladoc (API)](/overviews/contribute/scala-standard-library-api-documentation.html), [docs.scala-lang.org](/overviews/contribute/add-guides.html) and [scala-lang.org](https://github.com/scala/scala-lang).
221 changes: 221 additions & 0 deletions _overviews/contribute/add-guides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
---
title: Add New Guides/Tutorials
layout: multipage-overview
num: 7
partof: scala-contribution
overview-name: Contributing to Scala
---

## Why Contribute New Learning Material?

As [Heather Miller writes](/contribute.html), contributing to [docs.scala-lang.org](https://docs.scala-lang.org) is
critical to making Scala accessible to newcomers, experience programmers, and anyone who is curious.
It is also a fantastic way to contribute for anyone who is comfortable using Scala, but maybe does not want to get
involved with complex tools like the compiler.

## Architecture

This documentation website is backed by an open-source [github repository](https://github.com/scala/docs.scala-lang),
and is always contribution-ready.

### Content

Currently, the _types_ of documentation supported in this repository are:

- **Guides/Overviews**: Definitive guides/overviews of specific language features. Often long, detailed documents,
often produced by members of the Scala team. An example is the excellent [Collections][collections-overview] overview.
- **Tutorials**: Bite-size, example-rich, and concise articles meant to get a developer up to speed quickly.
- **Cheatsheets**: Quick reference of Scala syntax and behaviors.

### Implementation

The website is statically generated from [Markdown](https://en.wikipedia.org/wiki/Markdown) source using
[Jekyll](https://github.com/mojombo/jekyll), and hosted on [GitHub Pages](https://pages.github.com/).
This workflow was chosen so as to make it as easy as possible for core committers and the community alike
to produce HTML documentation, and as easy as possible to publish it in a central location.

The markdown syntax being used supports [Maruku](https://github.com/bhollis/maruku) extensions, and has automatic
syntax highlighting, without the need for any tags.

Additionally [mdoc](https://github.com/scalameta/mdoc) is used during pull requests to validate Scala code blocks.
To use this feature you must use the backtick notation as documented by mdoc. Note that only validation is done.
The output files from mdoc are not used in the building of the tutorial. Use `mdoc` or `mdoc:fail` for your code blocks.

## Submitting Docs

For one to contribute a document, one must simply
[fork](https://help.github.com/articles/fork-a-repo/) the
[repo](https://github.com/scala/docs.scala-lang), write their article in
[Markdown](https://daringfireball.net/projects/markdown/syntax) (example below), and submit a pull request. That's it.
Likely after some edits and discussion, your document will be made live
on [docs.scala-lang.org](https://docs.scala-lang.org).

---
layout: overview
title: My Awesome Title
---

## An h2 Header in Markdown

And a paragraph, with a [link](https://www.scala-lang.org).

One can contribute code in a markdown document by either
- indenting it by 4 spaces
- surrounding by triple backticks, as shown below
- in-line by putting backticks around it, e.g. `def foo`.

```scala
println("hello")
```

Everything else is automatically generated for you; tables of contents, and most index pages. And of course, the
styling is already taken care of for you.

### Criteria for Docs to be Accepted

The goal of this documentation repository is to be tighter and more organized than other community-driven documentation platforms, like wikis. As such, any document pulled in for inclusion on
[docs.scala-lang.org](https://docs.scala-lang.org) must:

- **"fit in"** to the repository ( _i.e.,_ it should not be a complete duplicate of another article),
- **be polished** it must be thorough, complete, correct, organized, and "article-like" (personal programming notes
don't quite fit.)
- **be maintained** if the document might require revisions from time to time, be prepared to keep it up to date, or
nominate someone to take ownership.

If you have something you're thinking about contributing, or that you're thinking about writing in order to contribute
-- we'd love to consider it! Please don't hesitate to use GitHub issues and pull requests and the
\#scala-contributors room [on Discord](https://discord.com/invite/scala) for any questions, concerns,
clarifications, etc.

## Document Templates

> **Note:** These templates will soon change slightly as a result of necessary refactoring.

### Guides/Overviews

A guide or an overview that can be logically placed on **one** page must be placed in the directory
`_overviews/RELEVANT-CATEGORY/_posts` with the file name in the format `YYYY-MM-dd-title-separated-by-dashes.md`,
and header:

---
layout: overview
title: YOUR TITLE
---

The rest of the document should, of course, be written in [Markdown](https://en.wikipedia.org/wiki/Markdown).

At the moment, `RELEVANT-CATEGORY` corresponds to only a single category, "core," because we are currently focusing on
building up documentation of core libraries. However, expect more categories here in the future.

If your document consists of **multiple** pages, like the [Collections][collections-overview] overview, an ordering
must be specified, by numbering documents in their logical order with `num`, and a name must be assigned to the
collection of pages using `partof`. For example, the following header might be used for a document in the collections
overview:

---
layout: overview
title: YOUR TITLE

partof: collections
num: 10
---

A **single** document in the collection must contain a tag in the header, `outof`, that indicates the total number of
documents in the large overview. Putting it on the last page in the overview is often best:

---
layout: overview
title: YOUR TITLE

partof: collections
num: 15
outof: 15
---

Index pages, such as [docs.scala-lang.org/overviews/index.html](https://docs.scala-lang.org/overviews/index.html) are
generated, by reading data from a configuration file, such as `_data/overviews.yml`, so your overview should be
placed into a category there.

### Tutorials

At the moment, tutorials are written the same as Guides/Overviews, except that their link must be added to
the metadata of `/tutorials.md`. e.g. for the [Scala With Maven][scala-with-maven] tutorial, the
metadata of `/tutorials.md` looks like

---
layout: inner-page-parent
title: Tutorials

tutorials:
...
- title: "Scala with Maven"
url: "/tutorials/scala-with-maven.html"
description: "Create a Scala project with Maven."
icon: code
---

For a single-page tutorial, the typical directory to place them in is `_overviews/tutorials`.

### Cheatsheets

For now, cheatsheets are assumed to be in the form of tables. To contribute a cheatsheet, one must simply produce their
cheatsheet as a Markdown table, with the following header:

---
layout: cheatsheet
title: YOUR TITLE
by: YOUR NAME
about: SOME TEXT ABOUT THE CHEAT SHEET.
---

### Code blocks

The site build process uses [mdoc](https://scalameta.org/mdoc/) to typecheck
code snippets in markdown. This is a great way to ensure the code snippets that
you're including typecheck and are valid. Here are a few quick types to get
started.

To get started, add `mdoc` after `scala` when you are creating a
code block. The `mdoc` modifier here will make sure that `mdoc` runs the code
snippet and ensures that it's valid.

```scala mdoc
val a = 1
```
If you have a snippet that you expect to fail, you can also account for this by
using `mdoc:fail` for a compile error `mdoc:crash` for a runtime-error.

```scala mdoc:fail
val b: String = 3 // won't compile
```
Keep in mind that a single file is all compiled as a single unit, so you can't
redefine a variable that was defined above in another code snippet. _However_
there are a couple ways to get around this. Firstly, you can use the `mdoc:nest`
modifier with will wrap the snippet in a `scala.Predef.locally{...}`. This will
essentially "hide" the snippet from the others. Another way around this is to
use the `mdoc:reset` modifier, which _resets_ and forgets about everything up
above. Here is an example using the various modifiers.

```scala mdoc
import java.time.Instant

def now() = Instant.now()
object Foo {}
```

```scala mdoc:nest
case class Foo(a: Int) // conflicts with Foo above, but it's nested so it's fine
```

```scala mdoc
val a = s"The time is ${now()}" // still have access to the now method from above
```
```scala mdoc:reset
case class Foo(a: String) // forget the previous Foo's and start fresh
```
```scala mdoc
val myFoo = Foo("hi") // now we only have access to the last Foo
```

[collections-overview]: {% link _overviews/collections-2.13/introduction.md %}
[scala-with-maven]: {% link _overviews/tutorials/scala-with-maven.md %}
2 changes: 1 addition & 1 deletion _overviews/contribute/bug-reporting-guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Bug Reporting Guide
layout: multipage-overview
num: 7
num: 8
partof: scala-contribution
overview-name: Contributing to Scala
---
Expand Down
4 changes: 2 additions & 2 deletions _overviews/contribute/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ without creating an issue, but please look to see if there is an issue already s
* SIP (Scala Improvement Process) Proposals
and more

Please read [contributing to the docs.scala-lang.org site](/contribute.html) through before embarking on changes. The site uses
Please read [Add New Guides/Tutorials](/overviews/contribute/add-guides.html) through before embarking on changes. The site uses
the [Jekyll](https://jekyllrb.com/) markdown engine so you will need to follow the instructions to get that running as well.

### Updating scala-lang.org
Expand All @@ -55,4 +55,4 @@ to Scala and related projects) is provided on the main
[scala-lang GitHub project](https://github.com/scala/scala-lang) which may be forked to create pull requests.

Please read both the
[docs.scala-lang.org contribution](/contribute.html) document and the [scala-lang.org GitHub README](https://github.com/scala/scala-lang#scala-langorg) before embarking on any changes to the Scala language site, as it uses the same Jekyll markdown tool and many of the same conventions as the Scala documentation site.
[Add New Guides/Tutorials](/overviews/contribute/add-guides.html) document and the [scala-lang.org GitHub README](https://github.com/scala/scala-lang#scala-langorg) before embarking on any changes to the Scala language site, as it uses the same Jekyll markdown tool and many of the same conventions as the Scala documentation site.
2 changes: 1 addition & 1 deletion _overviews/contribute/guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Contributing guide
layout: multipage-overview
num: 9
num: 10
partof: scala-contribution
overview-name: Contributing to Scala
---
Expand Down
2 changes: 1 addition & 1 deletion _overviews/contribute/hacker-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Scala hacker guide
by: Eugene Burmako
layout: multipage-overview
num: 11
num: 12
partof: scala-contribution
overview-name: Contributing to Scala
---
Expand Down
2 changes: 1 addition & 1 deletion _overviews/contribute/partest-guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Running the Test Suite
layout: multipage-overview
num: 12
num: 13
partof: scala-contribution
overview-name: Contributing to Scala
---
Expand Down
2 changes: 1 addition & 1 deletion _overviews/contribute/scala-internals.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Scala Contributors Forum
layout: multipage-overview
num: 8
num: 9
partof: scala-contribution
overview-name: Contributing to Scala
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sometimes referred to as Scaladoc contributions.

For contributions to tutorial and guide-style documentation on
[docs.scala-lang.org](/),
see the ["doc-site"'s contribution guide](/contribute.html).
see [Add New Guides/Tutorials](/overviews/contribute/add-guides.html).

*Please note, these instructions cover documentation contributions Scala core
libraries only. For other Scala projects please check those projects for the
Expand Down
2 changes: 1 addition & 1 deletion _overviews/contribute/tools.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: IDE and Build Tool Contributions
layout: multipage-overview
num: 10
num: 11
partof: scala-contribution
overview-name: Contributing to Scala

Expand Down
Loading