Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (95 sloc) 8.39 KB
layout title
Heather Miller

A Place to Build Documentation Together was intended to make it easier for the Scala team and the community at large to easily collect, organize, and "make public" many different types of documentation while making it easy for users to find, interact, and help us improve that documentation.

This website is an open-source repository of official Scala documentation, hosted on github, that is always ready for contributions.

A Need for Better Documentation

The availability, depth, and quality of documentation is considered by many to be a huge issue.

As Scala continues to mature, it continues to attract more and more interested newcomers and potential adopters who are well accustomed to easy-to-find, abundant, quality documentation (found in other languages, like Java). For many, the learning curve becomes unnecessarily steep, and people sometimes get frustrated.

If we want Scala to be accessible to more programmers, clear, easy-to-find documentation is essential.

If you're interested in contributing to the Scala project in general, I argue that one of the most meaningful ways that you can, is to help us improve this transfer of information- let's make it easier and faster for people to get core concepts, and to answer their own questions so they can progress to Scala-proficient quickly. Each line that you contribute has the potential to affect the entire Scala community as a whole-- current, and future.



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]({{ site.baseurl }}/overviews/collections/introduction.html) 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.


This documentation repository is open-source, it lives in github repository, and is always contribution-ready.

It's statically generated from Markdown source using Jekyll, and hosted on GitHub Pages. 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 extensions, and has automatic syntax highlighting, without the need for any tags.

Additionally tut is used during pull requests to validate Scala code blocks. To use this feature you must use the backtick notation as documented by tut. Note that only validation is done. The output files from tut are not used in the building of the tutorial. Either use tut or tut:fail for your code blocks.

Submitting Docs

For one to contribute a document, one must simply fork the repo, write their article in Markdown (example below), and submit a pull request. That's it. Likely after some edits and discussion, your document will be made live on

layout: overview
title: My Awesome Title

## An h2 Header in Markdown

And a paragraph, with a [link](

One can contribute code by indenting it 4 spaces, or in-line by putting backticks around it like so, `def foo`

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 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, it should come with an owner

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 Gitter for any questions, concerns, clarifications, etc.

Document Templates

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


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, and header:

layout: overview

The rest of the document should, of course, be written in 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]({{ site.baseurl }}/overviews/collections/introduction.html) 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

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

partof: collections
num: 15
outof: 15

Any overview document may also include comments. To include comments, just add the tag discourse: true to your header.

Index pages, such as are automatically generated, assuming documents are properly placed under the correct RELEVANT-CATEGORY. So, simply drop your document into the correct folder, and you're done.


At the moment, a tutorial that can be logically placed on one page must be placed in the directory tutorials/ with the file name in the format For the moment, single-page tutorials use the same layout as single-page overviews:

layout: overview

If you have a multiple-page tutorial, like in the case of multiple-page overviews, you must both specify an ordering for your document, and a name must be assigned to the collection of tutorial pages. For example, the following header is used for the [Tour of Scala]({{ site.baseurl }}/tour/tour-of-scala.html) series of tutorial articles:

layout: inner-page-no-masthead

tutorial: scala-tour
num: 4

Any tutorial document may also include comments. To include comments, just add the tag discourse: true to your header.

At the moment, only indexes for multiple-page tutorials are automatically generated.


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