Skip to content

a printable version of the style guide #580

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 3 commits 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
5 changes: 5 additions & 0 deletions _layouts/printable.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% include header.txt %}

<div class="container">
{{ content }}
</div>
1 change: 1 addition & 0 deletions style/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ title: Scala Style Guide
-->

<ul>
<li><a href="{{ site.baseurl }}/style/style-printable.html">Printable Version</a></li>
<li><a href="{{ site.baseurl }}/style/overview.html">Overview</a></li>
<li><a href="{{ site.baseurl }}/style/indentation.html">Indentation</a>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion style/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ num: 1
outof: 10
---

Please see the [table of contents of the style guide]({{ site.baseurl }}/style) for an outline-style overview.
Please see the [table of contents of the style guide](/style) for an outline-style overview.
14 changes: 14 additions & 0 deletions style/style-printable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: printable
title: Style Guide One Page
---

{% assign pages = site.pages | sort: "num" %}
{% for page in pages %}
{% if page.partof == "style-guide" %}
<div>
<h1>{{ page.title }}</h1>
{{ page.content | markdownify }}
</div>
{% endif %}
{% endfor %}