Skip to content

Commit 8cc0481

Browse files
committed
Setup redirects
1 parent 5dccfba commit 8cc0481

File tree

11 files changed

+17
-10
lines changed

11 files changed

+17
-10
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +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="/posts">Posts</a>
24-
<a class="nav-link" href="/changelog">Changelog</a>
23+
<a class="nav-link" href="/blog">Blog</a>
24+
<a class="nav-link" href="/thisweek">Changelog</a>
2525
<a class="nav-link" href="https://opencollective.com/rust-analyzer/">Sponsor</a>
2626
</header>
2727
{% endif %}

posts.html renamed to blog.html

File renamed without changes.

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.

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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ <h2>Support</h2>
5959
</section>
6060

6161
<section>
62-
<h2>News</h2>
62+
<h2>Latest News</h2>
6363

6464
<ul class="post-list">
65-
{% assign post = site.categories.changelog.first %}
65+
{% assign post = site.categories.thisweek.first %}
6666
<li>
6767
<h3>
6868
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
@@ -72,14 +72,14 @@ <h3>
7272

7373
<li>
7474
<h3>
75-
<a class="post-link" href="/changelog">All</a>
75+
<a class="post-link" href="/thisweek">All</a>
7676
</h3>
7777
</li>
7878
</ul>
7979
</section>
8080

8181
<section>
82-
<h2>Posts</h2>
82+
<h2>Latest Post</h2>
8383

8484
<ul class="post-list">
8585
{% assign post = site.categories.blog.first %}
@@ -92,7 +92,7 @@ <h3>
9292

9393
<li>
9494
<h3>
95-
<a class="post-link" href="/posts">All</a>
95+
<a class="post-link" href="/blog">All</a>
9696
</h3>
9797
</li>
9898
</ul>

changelog.html renamed to thisweek.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h2>This Week In rust-analyzer</h2>
55

66
<ul class="post-list">
7-
{% for post in site.categories.changelog %}
7+
{% for post in site.categories.thisweek %}
88
<li>
99
<h3>
1010
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link"

changelog/_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)