diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 000000000..57d4641d1 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_PATH: vendor/bundle +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/.gitignore b/.gitignore index f11e63506..1e12b7c98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ _site/ -.DS_Store \ No newline at end of file +.DS_Store +/vendor/bundle/ +/.jekyll-metadata diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..22eb5828d --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' +gem 'jekyll', '1.5.1' +gem 'json', '1.8.3' +gem 'kramdown', '1.8.0' +gem 'mercenary', '0.3.5' +gem 'posix-spawn', '0.3.11' +gem 'yajl-ruby', '1.2.1' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..0d402e89e --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,60 @@ +GEM + remote: https://rubygems.org/ + specs: + blankslate (2.1.2.4) + classifier (1.3.4) + fast-stemmer (>= 1.0.0) + colorator (0.1) + commander (4.1.6) + highline (~> 1.6.11) + fast-stemmer (1.0.2) + ffi (1.9.10) + highline (1.6.21) + jekyll (1.5.1) + classifier (~> 1.3) + colorator (~> 0.1) + commander (~> 4.1.3) + liquid (~> 2.5.5) + listen (~> 1.3) + maruku (= 0.7.0) + pygments.rb (~> 0.5.0) + redcarpet (~> 2.3.0) + safe_yaml (~> 1.0) + toml (~> 0.1.0) + json (1.8.3) + kramdown (1.8.0) + liquid (2.5.5) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + maruku (0.7.0) + mercenary (0.3.5) + parslet (1.5.0) + blankslate (~> 2.0) + posix-spawn (0.3.11) + pygments.rb (0.5.4) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rb-kqueue (0.2.4) + ffi (>= 0.5.0) + redcarpet (2.3.0) + safe_yaml (1.0.4) + toml (0.1.2) + parslet (~> 1.5.0) + yajl-ruby (1.2.1) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll (= 1.5.1) + json (= 1.8.3) + kramdown (= 1.8.0) + mercenary (= 0.3.5) + posix-spawn (= 0.3.11) + yajl-ruby (= 1.2.1) + +BUNDLED WITH + 1.10.6 diff --git a/README.md b/README.md index 3f5ae2eb2..4d01ea20b 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,35 @@ It's a static site generated by [Jekyll](https://github.com/mojombo/jekyll), and ## Dependencies -You'll need Jekyll installed to generate and test the site. To get it, most people can install via RubyGems: +This site uses a Jekyll, a Ruby framework. You'll need Ruby and Bundler installed; see [Jekyll installation instructions](http://jekyllrb.com/docs/installation/) for the details. - gem install jekyll +## Building & Viewing -OSX users might have to update RubyGems: +cd into the directory where you cloned this repository, then install the required gems with `bundle install`. This will automatically put the gems into `./vendor/bundle`. - sudo gem update --system +Start the server in the context of the bundle: -If in doubt, head over to the [Jekyll wiki](https://github.com/mojombo/jekyll/wiki) for installation instructions. + bundle exec jekyll serve -## Building +and watch the output. You should see something like: -After cloning, cd into the `scala/scala-lang` directory and run: + Configuration file: /Users/ben/src/scala.github.com/_config.yml + Source: /Users/ben/src/scala.github.com + Destination: /Users/ben/src/scala.github.com/_site + Incremental build: enabled + Generating... done. + Auto-regeneration: enabled for '/Users/ben/src/scala-lang' - jekyll serve +The generated site is available at `http://localhost:4000`. -To see the generated site, just visit `http://localhost:4000`. +Jekyll will automatically watch for changes on the filesystem. When you change a file, the console will show that jekyll is regenerating. Wait until it says `done` to refresh your browser. + +### Windows and UTF-8 + +If you get `incompatible encoding` errors when generating the site under Windows, then ensure that the +console in which you are running jekyll can work with UTF-8 characters. As described in the blog +[Solving UTF problem with Jekyll on Windows](http://joseoncode.com/2011/11/27/solving-utf-problem-with-jekyll-on-windows/) +you have to execute `chcp 65001`. This command is best added to the `jekyll.bat`-script. ## YAML Front Matter diff --git a/_config.yml b/_config.yml index f516b1e12..b9f9a1603 100644 --- a/_config.yml +++ b/_config.yml @@ -2,5 +2,6 @@ title: The Scala Programming Language scalaversion: "2.11.7" devscalaversion: "2.12.0-M3" + baseurl: "" markdown: kramdown diff --git a/_data/languages.yml b/_data/languages.yml new file mode 100644 index 000000000..fa8d70293 --- /dev/null +++ b/_data/languages.yml @@ -0,0 +1,86 @@ +ar: + name: "العربية" + +bn: + name: "বাংলা" + +ca: + name: "Català" + +cs: + name: "Čeština" + +de: + name: "Deutsch" + +en: + name: "English" + +es: + name: "Español" + +fa: + name: "فارسی" + +fi: + name: "Suomi" + +fr: + name: "Français" + +he: + name: "עברית" + +hi: + name: "हिन्दी" + +hu: + name: "Magyar" + +id: + name: "Bahasa Indonesia" + +it: + name: "Italiano" + +ja: + name: "日本語" + +ko: + name: "한국어" + +nl: + name: "Nederlands" + +no: + name: "Norsk (Bokmål)" + +pl: + name: "Polski" + +pt: + name: "Português" + +"pt-br": + name: "Português (Brasil)" + +ru: + name: "Русский" + +sv: + name: "Svenska" + +tr: + name: "Türkçe" + +vi: + name: "Tiếng Việt" + +uk: + name: "Українська" + +"zh-cn": + name: "中文 (简体)" + +"zh-tw": + name: "中文 (繁體)"