Skip to content

Fix #607: Improve build times drastically #684

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 3 commits into from
Feb 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 5 additions & 10 deletions _includes/tutorial-tour-list.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
{% for pg in site.pages %}
{% if pg.tutorial == "scala-tour" and pg.outof and pg.language == page.language %}
{% assign totalPagesTour = pg.outof %}
{% endif %}
{% endfor %}
{% assign sorted_tour_posts = site.categories.tour | sort: 'num' %}
{% assign tour_posts_size = sorted_tour_posts | size %}

{% if totalPagesTour %}
{% if tour_posts_size %}
<ul>
{% for i in (1..totalPagesTour) %}
{% for pg in site.pages %}
{% if pg.tutorial == "scala-tour" and pg.num and pg.num == i and pg.language == page.language %}
{% for pg in sorted_tour_posts %}
{% if pg.language == page.language %}
<li class="tour-of-scala {% if page.title == pg.title %} current-page {% endif %}">
<a href="{{ pg.url }}">{{ pg.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% else %} **ERROR**. Couldn't find the total number of pages in this set of tutorial articles. Have you declared the `outof` tag in your YAML front matter?
{% endif %}
7 changes: 4 additions & 3 deletions _layouts/tutorial.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: default
layout: post
permalink: /tutorials/:categories/:title/
---
{% include header.txt %}
<div class="wrapper">
Expand All @@ -10,8 +11,8 @@

<div class="span10">{% if page.title %}<h1>{{ page.title }}</h1>{% else %}<h1>{{ site.title }}</h1>{% endif %}</div>

{% for pg in site.pages %}
{% if pg.tutorial == "scala-tour" and pg.languages %}
{% for pg in site.categories.tour %}
{% if pg.languages %}
{% assign languages = pg.languages %}
{% endif %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Abstract Types
disqus: true

tutorial: scala-tour
categories: tour
num: 23
next-page: compound-types
previous-page: inner-classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Annotations
disqus: true

tutorial: scala-tour
categories: tour
num: 32
next-page: default-parameter-values
previous-page: automatic-closures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Anonymous Function Syntax
disqus: true

tutorial: scala-tour
categories: tour
num: 7
next-page: higher-order-functions
previous-page: mixin-class-composition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Automatic Type-Dependent Closure Construction
disqus: true

tutorial: scala-tour
categories: tour
num: 31
next-page: annotations
previous-page: operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Basics
disqus: true

tutorial: scala-tour
categories: tour
num: 2
next-page: unified-types
previous-page: tour-of-scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Case Classes
disqus: true

tutorial: scala-tour
categories: tour
num: 11
next-page: pattern-matching
previous-page: currying
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Classes
disqus: true

tutorial: scala-tour
categories: tour
num: 4
next-page: traits
previous-page: unified-types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Compound Types
disqus: true

tutorial: scala-tour
categories: tour
num: 24
next-page: explicitly-typed-self-references
previous-page: abstract-types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Currying
disqus: true

tutorial: scala-tour
categories: tour
num: 10
next-page: case-classes
previous-page: nested-functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Default Parameter Values
disqus: true

tutorial: scala-tour
categories: tour
num: 33
next-page: named-parameters
previous-page: annotations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Explicitly Typed Self References
disqus: true

tutorial: scala-tour
categories: tour
num: 25
next-page: implicit-parameters
previous-page: compound-types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Extractor Objects
disqus: true

tutorial: scala-tour
categories: tour
num: 16
next-page: sequence-comprehensions
previous-page: regular-expression-patterns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Generic Classes
disqus: true

tutorial: scala-tour
categories: tour
num: 18
next-page: variances
previous-page: sequence-comprehensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Higher-order Functions
disqus: true

tutorial: scala-tour
categories: tour
num: 8
next-page: nested-functions
previous-page: anonymous-function-syntax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Implicit Conversions
disqus: true

tutorial: scala-tour
categories: tour
num: 27
next-page: polymorphic-methods
previous-page: implicit-parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Implicit Parameters
disqus: true

tutorial: scala-tour
categories: tour
num: 26
next-page: implicit-conversions
previous-page: explicitly-typed-self-references
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Inner Classes
disqus: true

tutorial: scala-tour
categories: tour
num: 22
next-page: abstract-types
previous-page: lower-type-bounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Local Type Inference
disqus: true

tutorial: scala-tour
categories: tour
num: 29
next-page: operators
previous-page: polymorphic-methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Lower Type Bounds
disqus: true

tutorial: scala-tour
categories: tour
num: 21
next-page: inner-classes
previous-page: upper-type-bounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Mixin Class Composition
disqus: true

tutorial: scala-tour
categories: tour
num: 6
next-page: anonymous-function-syntax
previous-page: traits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Named Parameters
disqus: true

tutorial: scala-tour
categories: tour
num: 34
previous-page: default-parameter-values
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Nested Functions
disqus: true

tutorial: scala-tour
categories: tour
num: 9
next-page: currying
previous-page: higher-order-functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Operators
disqus: true

tutorial: scala-tour
categories: tour
num: 30
next-page: automatic-closures
previous-page: local-type-inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Pattern Matching
disqus: true

tutorial: scala-tour
categories: tour
num: 12

next-page: singleton-objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Polymorphic Methods
disqus: true

tutorial: scala-tour
categories: tour
num: 28

next-page: local-type-inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Regular Expression Patterns
disqus: true

tutorial: scala-tour
categories: tour
num: 15

next-page: extractor-objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Sequence Comprehensions
disqus: true

tutorial: scala-tour
categories: tour
num: 17
next-page: generic-classes
previous-page: extractor-objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Singleton Objects
disqus: true

tutorial: scala-tour
categories: tour
num: 13

next-page: xml-processing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Introduction
disqus: true

tutorial: scala-tour
categories: tour
num: 1
languages: [ba, es, ko, pt-br, pl]
outof: 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Traits
disqus: true

tutorial: scala-tour
categories: tour
num: 5
next-page: mixin-class-composition
previous-page: classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Unified Types
disqus: true

tutorial: scala-tour
categories: tour
num: 3
next-page: classes
previous-page: basics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Upper Type Bounds
disqus: true

tutorial: scala-tour
categories: tour
num: 20
next-page: lower-type-bounds
previous-page: variances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: XML Processing
disqus: true

tutorial: scala-tour
categories: tour
num: 14
next-page: regular-expression-patterns
previous-page: singleton-objects
Expand Down