Skip to content

Commit 1bef953

Browse files
bors[bot]matklad
andauthored
Merge #12
12: seccond attempt at changelogs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
2 parents f040284 + b2f7659 commit 1bef953

File tree

11 files changed

+70
-6
lines changed

11 files changed

+70
-6
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
77
gem "jekyll", "~> 3.8"
88

99
group :jekyll_plugins do
10-
10+
gem "jekyll-redirect-from"
1111
end

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ GEM
2727
pathutil (~> 0.9)
2828
rouge (>= 1.7, < 4)
2929
safe_yaml (~> 1.0)
30+
jekyll-redirect-from (0.15.0)
31+
jekyll (>= 3.3, < 5.0)
3032
jekyll-sass-converter (1.5.2)
3133
sass (~> 3.4)
3234
jekyll-watch (2.2.1)
@@ -56,6 +58,7 @@ PLATFORMS
5658

5759
DEPENDENCIES
5860
jekyll (~> 3.8)
61+
jekyll-redirect-from
5962

6063
BUNDLED WITH
6164
1.17.2

_config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ github_username: rust-analyzer
66
exclude:
77
- wasm-demo/
88
- vendor
9+
plugins:
10+
- jekyll-redirect-from

_layouts/default.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
{% if page.url != "/" %}
2121
<header>
2222
<a class="nav-link site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
23+
<a class="nav-link" href="/blog">Blog</a>
24+
<a class="nav-link" href="/thisweek">Changelog</a>
2325
<a class="nav-link" href="https://opencollective.com/rust-analyzer/">Sponsor</a>
2426
</header>
2527
{% endif %}

blog.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
---
4+
<h2>Posts</h2>
5+
6+
<ul class="post-list">
7+
{% for post in site.categories.blog %}
8+
<li>
9+
<h3>
10+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"
11+
href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
12+
</h3>
13+
</li>
14+
{% endfor %}
15+
</ul>

_posts/2019-10-16-finance.md renamed to blog/_posts/2019-10-16-finance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
title: "Cost of rust-analyzer"
44
date: 2019-10-16 11:00:00 +0200
5+
redirect_from: "/2019/10/16/finance.html"
56
---
67

78
In this post, we'll talk about financial side of the rust-analyzer project.

_posts/2019-11-13-find-usages.md renamed to blog/_posts/2019-11-13-find-usages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
title: "Find Usages"
44
date: 2019-11-13 11:00:00 +0200
5+
redirect_from: "/2019/11/13/find-usages.html"
56
---
67

78
Last month, rust-analyzer gained an exciting new feature: find usages. It was implemented by [@viorina] in [#1892].

css/main.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ footer > p {
122122
.post-list {
123123
margin-left: 0;
124124
list-style: none;
125-
align-self: center;
126125
}
127126

128127
.post-list > li {

index.html

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,38 @@ <h2>Support</h2>
6262
<h2>Latest News</h2>
6363

6464
<ul class="post-list">
65-
{% for post in site.posts %}
65+
{% assign post = site.categories.thisweek.first %}
6666
<li>
6767
<h3>
68-
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"
69-
href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
68+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
69+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
70+
</h3>
71+
</li>
72+
73+
<li>
74+
<h3>
75+
<a class="post-link" href="/thisweek">All</a>
76+
</h3>
77+
</li>
78+
</ul>
79+
</section>
80+
81+
<section>
82+
<h2>Latest Post</h2>
83+
84+
<ul class="post-list">
85+
{% assign post = site.categories.blog.first %}
86+
<li>
87+
<h3>
88+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
89+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
90+
</h3>
91+
</li>
92+
93+
<li>
94+
<h3>
95+
<a class="post-link" href="/blog">All</a>
7096
</h3>
7197
</li>
72-
{% endfor %}
7398
</ul>
7499
</section>

thisweek.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
---
4+
<h2>This Week In rust-analyzer</h2>
5+
6+
<ul class="post-list">
7+
{% for post in site.categories.thisweek %}
8+
<li>
9+
<h3>
10+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"
11+
href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
12+
</h3>
13+
</li>
14+
{% endfor %}
15+
</ul>

_posts/2019-07-24-changelog-0.md renamed to thisweek/_posts/2019-07-24-changelog-0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
title: "Changelog #0"
44
date: 2019-07-24 14:34:00 +0200
5+
redirect_from: "/2019/07/24/changelog-0.html"
56
---
67

78
Hello!

0 commit comments

Comments
 (0)