Skip to content

Commit 1e37f70

Browse files
committed
Make blog work with Jekyll
1 parent 294f4b0 commit 1e37f70

18 files changed

+95
-35
lines changed

docs/_config.yml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,6 @@
1-
# Welcome to Jekyll!
2-
#
3-
# This config file is meant for settings that affect your whole blog, values
4-
# which you are expected to set up once and rarely edit after that. If you find
5-
# yourself editing these this file very often, consider using Jekyll's data files
6-
# feature for the data you need to update frequently.
7-
#
8-
# For technical reasons, this file is *NOT* reloaded automatically when you use
9-
# 'jekyll serve'. If you change this file, please restart the server process.
10-
11-
# Site settings
12-
# These are used to personalize your new site. If you look in the HTML files,
13-
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
14-
# You can create any custom variable you would like, and they will be accessible
15-
# in the templates via {{ site.myvariable }}.
16-
title: Your awesome title
17-
email: your-email@domain.com
18-
description: > # this means to ignore newlines until "baseurl:"
19-
Write an awesome description for your new site here. You can edit this
20-
line in _config.yml. It will appear in your document head meta (for
21-
Google search results) and in your feed.xml site description.
22-
baseurl: "" # the subpath of your site, e.g. /blog
23-
url: "http://example.com" # the base hostname & protocol for your site
24-
twitter_username: jekyllrb
25-
github_username: jekyll
26-
27-
# Build settings
28-
#markdown: kramdown
1+
title: Dotty Documentation
2+
baseurl: "/"
293
markdown: JekyllMarkdownLinkConverter
304
theme: minima
31-
325
gems:
336
- jekyll-toc

docs/_includes/toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% include scala-logo.html %}
44
</div>
55
<ul id="categories">
6+
<li><ul><li><a href="/blog">Blog</a></li></ul></li>
67
<li><ul><li><a href="/">Dotty Docs</a></li></ul></li>
78
<li>
89
Usage

docs/_layouts/blog.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: default
3+
---
4+
5+
<h1 class="title">{{ page.title }}</h1>
6+
<h2 class="subtitle">{{ page.subTitle }}</h2>
7+
8+
<div class="author-container {% if page.authorImg != null %} spaced {% endif %}">
9+
{% if page.authorImg != null %}
10+
<img src="{{ page.authorImg }}"/>
11+
{% endif %}
12+
<div class="author-info">
13+
<div>{{ page.author }}</div>
14+
<div>{{ page.date | date: '%B %d, %Y' }}</div>
15+
</div>
16+
</div>
17+
18+
{{ content }}

docs/_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<html>
22
<head>
33
<title>Dotty - {{ page.title }}</title>
4+
<link rel="shortcut icon" type="image/png" href="/images/favicon.png"/>
45
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/github.min.css">
56
<link rel="stylesheet" href="/css/main.css">
67
</head>

docs/_posts/2015-10-23-dotty-compiler-bootstraps.md renamed to docs/blog/_posts/2015-10-23-dotty-compiler-bootstraps.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
2+
layout: blog
23
author: Martin Odersky and Dmitry Petrashko
34
title: "We got liftoff!"
45
subTitle: The Dotty compiler for Scala bootstraps.
56
---
67

7-
## We got liftoff!
8-
98
The [Dotty project](https://github.com/lampepfl/dotty)
109
is a platform to develop new technology for Scala
1110
tooling and to try out concepts of future Scala language versions.

docs/_posts/2016-01-02-new-year-resolutions.md renamed to docs/blog/_posts/2016-01-02-new-year-resolutions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
layout: blog
23
title: New Year Resolutions
34
author: Martin Odersky
45
authorImg: /images/martin.jpg

docs/_posts/2016-02-03-essence-of-scala.md renamed to docs/blog/_posts/2016-02-03-essence-of-scala.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
layout: blog
23
title: The Essence of Scala
34
author: Martin Odersky
45
authorImg: /images/martin.jpg

docs/_posts/2016-02-17-scaling-dot-soundness.md renamed to docs/blog/_posts/2016-02-17-scaling-dot-soundness.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
layout: blog
23
title: Scaling DOT to Scala - Soundness
34
author: Martin Odersky
45
authorImg: /images/martin.jpg

docs/_posts/2016-05-05-multiversal-equality.md renamed to docs/blog/_posts/2016-05-05-multiversal-equality.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
layout: blog
23
title: Multiversal Equality for Scala
34
author: Martin Odersky
45
authorImg: /images/martin.jpg

docs/blog/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: default
3+
title: "Blog"
4+
---
5+
6+
<h1>Blog</h1>
7+
8+
<ul class="post-list">
9+
{% for post in site.posts %}
10+
<li>
11+
<div>
12+
<a href="{{ post.url }}">{{ post.title }}</a>
13+
</div>
14+
<div class="date">
15+
{{ post.date | date: '%B %d, %Y' }}
16+
</div>
17+
<div class="excerpt">
18+
{{ post.excerpt }}
19+
</div>
20+
</li>
21+
{% endfor %}
22+
</ul>

docs/css/main.scss

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,24 @@ div#container {
6161

6262
div#content {
6363
margin-top: $distance-top;
64-
max-width: $content-width - $toc-width;
64+
width: $content-width - $toc-width;
6565
float: right;
6666
display: inline;
67+
68+
> h1.title {
69+
margin-bottom: 0;
70+
}
71+
72+
> h2.subtitle {
73+
font-size: 20px;
74+
}
6775
}
6876

6977
div#toc {
7078
float: left;
7179
margin-top: $distance-top;
7280
padding-right: 20px;
7381
width: $toc-width;
74-
height: 100%;
7582

7683
> div {
7784
position: fixed;
@@ -118,6 +125,41 @@ div#container {
118125
}
119126
}
120127

128+
div.author-container {
129+
height: 50px;
130+
margin-bottom: 15px;
131+
> img {
132+
float: left;
133+
width: 100px;
134+
border-radius: 50%;
135+
}
136+
137+
> div.author-info {
138+
color: rgba(0,0,0,0.45);
139+
float: left;
140+
}
141+
}
142+
143+
div.author-container.spaced {
144+
height: 100px;
145+
146+
> div.author-info {
147+
margin: 28px 0 0 20px;
148+
}
149+
}
150+
151+
ul.post-list {
152+
> li+li {
153+
margin-top: 15px;
154+
}
155+
156+
> li {
157+
div.date {
158+
color: rgba(0,0,0,0.45);
159+
}
160+
}
161+
}
162+
121163
pre, code {
122164
padding: 0;
123165
border: 0;
@@ -136,7 +178,7 @@ body {
136178
max-width: 1000px;
137179

138180
div#content {
139-
max-width: 1000px - $toc-width;
181+
width: 1000px - $toc-width;
140182
}
141183
}
142184
}
@@ -146,7 +188,7 @@ body {
146188
max-width: 900px;
147189

148190
div#content {
149-
max-width: 900px - $toc-width;
191+
width: 900px - $toc-width;
150192
}
151193
}
152194
}

docs/images/favicon.png

3.23 KB
Loading

docs/images/felix.jpeg

48 KB
Loading

docs/images/fengyun.png

271 KB
Loading

docs/images/martin.jpg

20.1 KB
Loading

docs/images/nico.png

566 KB
Loading

docs/images/petrashko.png

90.6 KB
Loading

docs/images/smarter.jpg

128 KB
Loading

0 commit comments

Comments
 (0)