Skip to content

Commit

Permalink
Fix root uri of the blog
Browse files Browse the repository at this point in the history
Blog posts are under /blog/... but the blog index is under /posts/, as a
consequence the "Blog" button is not shown as active when a blog post is
shown.

Setup a redirect so that the old URI does not break, and relocate the
blog index in /blog/.
  • Loading branch information
smortex committed Mar 12, 2024
1 parent 50c11f9 commit 9a39c38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ gem 'rake'
gem 'rubocop', '~> 1.31'
gem 'rubocop-rake'

# https://github.com/gjtorikian/jekyll-last-modified-at
group :jekyll_plugins do
# https://github.com/gjtorikian/jekyll-last-modified-at
gem 'jekyll-last-modified-at'
# https://github.com/jekyll/jekyll-redirect-from
gem "'ekyll-redirect-from'
end
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ navigation:
- title: Sponsoring
url: /sponsoring/
- title: Blog
url: /posts/
url: /blog/

exclude: ["Gemfile", "Gemfile.lock", "LICENSE", "README.md", "CNAME", "README.md", "vendor"]

plugins:
- jekyll-last-modified-at
- jekyll-redirect-from
2 changes: 2 additions & 0 deletions posts/index.md → blog/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
layout: post-index
title: All Posts
redirect_from:
- /posts/
---

0 comments on commit 9a39c38

Please sign in to comment.