Skip to content

jenshalm/website

 
 

Repository files navigation

scala-sbt.org

This project is the source for scala-sbt.org. See contributors for the list of documentation contributors.

scala-sbt.org is powered by two static site engines.

nanoc is used for the landing pages.

Pamflet, a Scala-based documentation engine written by @n8han (and some contributions from @eed3si9n) generates 0.13+ documentations.

These two engines are driven by sbt-site and sbt-ghpages. We will shortly use pandoc to also generate pdf files.

Attention plugin authors

The source for Community plugins page is at src/reference/01-General-Info/02-Community-Plugins.md. Fork this project, add your plugin and send us a pull request if your plugin is not already on it.

Setup

Currently, nanoc requires Ruby 2.1 or greater.

You'll need the following gems for running nanoc:

$ gem install nanoc:4.0.2
$ gem install redcarpet
$ gem install nokogiri

If you're running ubuntu, you'll need to also install ruby-dev for the native-code in redcarpet, and pandoc/latex for PDF generation:

$ sudo add-apt-repository ppa:texlive-backports/ppa
$ sudo apt-get update
$ sudo apt-get install ruby-dev pandoc latex-cjk-all texlive-full

On Mac

Usage

To make site locally, from sbt shell:

> makeSite

To push site, from sbt shell:

> ghpagesPushSite

Beware of sbt/sbt-ghpages#25

Releasing new sbt

  • Update project/build.properties
  • Update project/Docs.scala
  • Update src/nanoc/nanoc.yaml
  • Update src/reference/template.properties

Including code examples

To include a validated code examples, create a scripted test under src/sbt-test, and in the markdown include as:

// This includes the entire file as Scala code snippet
@@snip [build.sbt]($root$/src/sbt-test/ref/basic/build.sbt) {}

or

// This includes snippet between a line containing #example another line with #example
@@snip [build.sbt]($root$/src/sbt-test/ref/basic/build.sbt) { #example }

or

// This specifies syntax highlight
@@snip [build.sbt]($root$/src/sbt-test/ref/basic/build.sbt) { #example type=text }

About

The source for scala-sbt.org

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 30.8%
  • HTML 23.4%
  • CSS 20.7%
  • Python 13.6%
  • JavaScript 9.3%
  • Ruby 1.8%
  • Shell 0.4%