Skip to content

Port glossary and Java tutorial to scala-lang, ... #359

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_site/
.DS_Store
.DS_Store
vendor/bundle
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'jekyll'
39 changes: 39 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
colorator (0.1)
ffi (1.9.10)
jekyll (3.0.1)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-watch (1.3.0)
listen (~> 3.0)
kramdown (1.9.0)
liquid (3.0.6)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.5)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.19)

PLATFORMS
ruby

DEPENDENCIES
jekyll

BUNDLED WITH
1.10.6
51 changes: 41 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,56 @@ This repository contains the _static_ source of [scala-lang.org](http://scala-la

It's a static site generated by [Jekyll](https://github.com/mojombo/jekyll), and uses a whole host of open-source tools including a touch of Twitter's Bootstrap.

## Dependencies
## 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 -i

## Building
The generated site is available at `http://localhost:4000`

After cloning, cd into the `scala/scala-lang` directory and run:
Jekyll will automatically watch for changes on the filesystem, and regenerate the site. It can take a few minutes for your changes to appear. Watch the output from `jekyll serve`. When you start up you'll see this:

jekyll serve
bundle exec jekyll serve -i
Configuration file: /home/soc/Entwicklung/scala-lang/_config.yml
Source: /home/soc/Entwicklung/scala-lang
Destination: /home/soc/Entwicklung/scala-lang/_site
Incremental build: enabled
Generating...
done in 1.04 seconds.
Auto-regeneration: enabled for '/home/soc/Entwicklung/scala-lang'
Configuration file: /home/soc/Entwicklung/scala-lang/_config.yml
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.

To see the generated site, just visit `http://localhost:4000`.

$ bundle exec jekyll serve -i
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 in 1.04 seconds.
Auto-regeneration: enabled for '/Users/ben/src/scala-lang'

When you change a file, this output will tell you that jekyll is regenerating. It's not done until it says `done.`

Server running... press ctrl-c to stop.
Regenerating: 1 file(s) at 2014-11-29 09:19:04 ...done in 0.9704294 seconds.
Regenerating: 3 file(s) at 2014-11-29 09:21:39 ...done in 1.9161814 seconds.
Regenerating: 2 file(s) at 2014-11-29 09:25:10 ...done in 1.2371298 seconds.
Regenerating: 2 file(s) at 2014-11-29 09:27:49

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

Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ title: The Scala Programming Language

scalaversion: "2.11.7"
devscalaversion: "2.12.0-M3"

baseurl: ""
exclude: ["vendor"]
107 changes: 2 additions & 105 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,105 +1,2 @@

<div class="footer">
<div class="container">
<ul>
<li><h5>Documentation</h5></li>
<li><a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a></li>
<li><a href="http://www.scala-lang.org/api/current/index.html#package">API</a></li>
<li><a href="http://docs.scala-lang.org/overviews/">Overviews/Guides</a></li>
<li><a href="http://docs.scala-lang.org/tutorials/">Tutorials</a></li>
<li><a href="{{ site.baseurl }}/files/archive/spec/2.11/">Language Specification</a></li>
</ul>
<ul>
<li><h5>Download</h5></li>
<li><a href="/download/">Stable Release</a></li>
<li><a href="/download/{{ site.devscalaversion }}.html">Development Release</a></li>
</ul>
<ul>
<li><h5>Community</h5></li>
<li><a href="{{ site.baseurl }}/community/index.html#mailing_lists">Mailing lists</a></li>
<li><a href="{{ site.baseurl }}/community/index.html#irc">Social Media</a></li>
</ul>
<ul>
<li><h5>Contribute</h5></li>
<li><a href="{{ site.baseurl }}/contribute/bug-reporting-guide.html">Report an Issue</a></li>
<li><a href="{{ site.baseurl }}/contribute">How to Help</a></li>
<li><a href="{{ site.baseurl }}/contribute/hacker-guide.html">Contributor's Guide</a></li>
<li><a href="{{ site.baseurl }}/contribute/scala-fame.html">Contributor's Hall of Fame</a></li>
</ul>
<ul>
<li><h5>Scala</h5></li>
<li><a href="{{ site.baseurl }}/blog">Blog</a></li>
<li><a href="{{ site.baseurl }}/news">News Archive</a></li>
<li><a href="{{ site.baseurl }}/license.html">Scala License</a></li>
</ul>
</div>
<div class="container">
<div class="copyright">
<a style="float: left; margin-right: 8px;" href="http://www.epfl.ch"><img src="{{ site.baseurl }}/resources/img/epfl-logo.png" alt="EPFL logo" /></a>
<p style="float: left;"><br/>Copyright &copy; 2002-<span class="current-year"></span> École Polytechnique Fédérale de Lausanne
(EPFL)<br/> Lausanne, Switzerland</p>
</div>
<div class="scala-logo-footer">
<img src="{{ site.baseurl }}/resources/img/scala-logo-red-footer.png" alt="Scala footer logo" />
</div>
</div> <!-- container -->
</div> <!-- footer -->

<!-- prettify js -->
<script src="{{ site.baseurl }}/resources/js/vendor/prettify/prettify.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/prettify/lang-scala.js" type="text/javascript" ></script>

<!-- jquery js -->
<script src="{{ site.baseurl }}/resources/js/vendor/jquery-1.8.3.min.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/jquery.stellar.min.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/tweetMachine.min.js" type="text/javascript" ></script>

<!-- modernizr js -->
<script src="{{ site.baseurl }}/resources/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js" type="text/javascript" ></script>

<!-- retina js -->
<script src="{{ site.baseurl }}/resources/js/vendor/retina.js" type="text/javascript" ></script>

<!-- backstretch js -->
<script src="{{ site.baseurl }}/resources/js/vendor/jquery.backstretch.min.js" type="text/javascript" ></script>

<!-- Bootstrap JS -->
<script src="{{ site.baseurl }}/resources/js/vendor/bootstrap.min.js" type="text/javascript" ></script>

{% unless page.layout == 'page' %}
<!-- table of contents JS -->
<script src="{{ site.baseurl }}/resources/js/vendor/toc.js" type="text/javascript" ></script>
<script type="text/javascript">
$(document).ready(function(){
$('#toc').toc({exclude: 'h1, h5, h6', context: '', autoId: true, numerate: false});
function moveScroller() {
if ($(".sidebar").length == 0)
return;
var a = function() {
var topOfScroll = $(window).scrollTop();
var topOfSidebar = $(".sidebar").offset().top;
var sidebarInner = $(".sidebar-inner");
var bottomOfSidebarInner = $(".sidebar-inner").offset().top + $(".sidebar-inner").outerHeight();
var topOfFooter = $(".footer").offset().top - 10;
var footerHeight = $(".footer").outerHeight();
if (topOfScroll > topOfSidebar) {
if (bottomOfSidebarInner > topOfFooter) {
sidebarInner.css({position:"fixed",bottom:footerHeight,top:""});
} else {
sidebarInner.css({position:"fixed",top:"10px",bottom:""});
}
} else {
sidebarInner.css({position:"relative",top:""});
}
};
$(window).scroll(a);a()
}
moveScroller();
})
</script>
{% endunless %}

<!-- Custom javascript -->
<script src="{{ site.baseurl }}/resources/js/main.js" type="text/javascript"></script>
</body>
</html>
{% include footertop.html %}
{% include footerbottom.html %}
2 changes: 2 additions & 0 deletions _includes/footerbottom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
</body>
</html>
103 changes: 103 additions & 0 deletions _includes/footertop.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

<div class="footer">
<div class="container">
<ul>
<li><h5>Documentation</h5></li>
<li><a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a></li>
<li><a href="http://www.scala-lang.org/api/current/index.html#package">API</a></li>
<li><a href="http://docs.scala-lang.org/overviews/">Overviews/Guides</a></li>
<li><a href="http://docs.scala-lang.org/tutorials/">Tutorials</a></li>
<li><a href="{{ site.baseurl }}/files/archive/spec/2.11/">Language Specification</a></li>
</ul>
<ul>
<li><h5>Download</h5></li>
<li><a href="/download/">Stable Release</a></li>
<li><a href="/download/{{ site.devscalaversion }}.html">Development Release</a></li>
</ul>
<ul>
<li><h5>Community</h5></li>
<li><a href="{{ site.baseurl }}/community/index.html#mailing_lists">Mailing lists</a></li>
<li><a href="{{ site.baseurl }}/community/index.html#irc">Social Media</a></li>
</ul>
<ul>
<li><h5>Contribute</h5></li>
<li><a href="{{ site.baseurl }}/contribute/bug-reporting-guide.html">Report an Issue</a></li>
<li><a href="{{ site.baseurl }}/contribute">How to Help</a></li>
<li><a href="{{ site.baseurl }}/contribute/hacker-guide.html">Contributor's Guide</a></li>
<li><a href="{{ site.baseurl }}/contribute/scala-fame.html">Contributor's Hall of Fame</a></li>
</ul>
<ul>
<li><h5>Scala</h5></li>
<li><a href="{{ site.baseurl }}/blog">Blog</a></li>
<li><a href="{{ site.baseurl }}/news">News Archive</a></li>
<li><a href="{{ site.baseurl }}/license.html">Scala License</a></li>
</ul>
</div>
<div class="container">
<div class="copyright">
<a style="float: left; margin-right: 8px;" href="http://www.epfl.ch"><img src="{{ site.baseurl }}/resources/img/epfl-logo.png" alt="EPFL logo" /></a>
<p style="float: left;"><br/>Copyright &copy; 2002-<span class="current-year"></span> École Polytechnique Fédérale de Lausanne
(EPFL)<br/> Lausanne, Switzerland</p>
</div>
<div class="scala-logo-footer">
<img src="{{ site.baseurl }}/resources/img/scala-logo-red-footer.png" alt="Scala footer logo" />
</div>
</div> <!-- container -->
</div> <!-- footer -->

<!-- prettify js -->
<script src="{{ site.baseurl }}/resources/js/vendor/prettify/prettify.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/prettify/lang-scala.js" type="text/javascript" ></script>

<!-- jquery js -->
<script src="{{ site.baseurl }}/resources/js/vendor/jquery-1.8.3.min.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/jquery.stellar.min.js" type="text/javascript" ></script>
<script src="{{ site.baseurl }}/resources/js/vendor/tweetMachine.min.js" type="text/javascript" ></script>

<!-- modernizr js -->
<script src="{{ site.baseurl }}/resources/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js" type="text/javascript" ></script>

<!-- retina js -->
<script src="{{ site.baseurl }}/resources/js/vendor/retina.js" type="text/javascript" ></script>

<!-- backstretch js -->
<script src="{{ site.baseurl }}/resources/js/vendor/jquery.backstretch.min.js" type="text/javascript" ></script>

<!-- Bootstrap JS -->
<script src="{{ site.baseurl }}/resources/js/vendor/bootstrap.min.js" type="text/javascript" ></script>

{% unless page.layout == 'page' %}
<!-- table of contents JS -->
<script src="{{ site.baseurl }}/resources/js/vendor/toc.js" type="text/javascript" ></script>
<script type="text/javascript">
$(document).ready(function(){
$('#toc').toc({exclude: 'h1, h5, h6', context: '', autoId: true, numerate: false});
function moveScroller() {
if ($(".sidebar").length == 0 || $(".sidebar-inner").length == 0)
return;
var a = function() {
var topOfScroll = $(window).scrollTop();
var topOfSidebar = $(".sidebar").offset().top;
var sidebarInner = $(".sidebar-inner");
var bottomOfSidebarInner = $(".sidebar-inner").offset().top + $(".sidebar-inner").outerHeight();
var topOfFooter = $(".footer").offset().top - 10;
var footerHeight = $(".footer").outerHeight();
if (topOfScroll > topOfSidebar) {
if (bottomOfSidebarInner > topOfFooter) {
sidebarInner.css({position:"fixed",bottom:footerHeight,top:""});
} else {
sidebarInner.css({position:"fixed",top:"10px",bottom:""});
}
} else {
sidebarInner.css({position:"relative",top:""});
}
};
$(window).scroll(a);a()
}
moveScroller();
})
</script>
{% endunless %}

<!-- Custom javascript -->
<script src="{{ site.baseurl }}/resources/js/main.js" type="text/javascript"></script>
1 change: 0 additions & 1 deletion _includes/headerbottom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

</head>
<body>
Loading