From 99afc183f1a2e27c68c60162dc07057f6e905d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Bra=C4=8Devac?= Date: Wed, 3 Dec 2025 17:02:27 +0100 Subject: [PATCH 1/2] Fix permalink due to SIP changes --- _data/overviews-ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/overviews-ja.yml b/_data/overviews-ja.yml index 60277bd90c..cc62af0ce9 100644 --- a/_data/overviews-ja.yml +++ b/_data/overviews-ja.yml @@ -89,7 +89,7 @@ 文字列補間は、ユーザーが加工文字列リテラル(processed string literal)に変数参照を直接埋め込めるようにしてくれる。以下例。
val name = "James"
         println(s"Hello, $name")  // Hello, James
- 上記例では、リテラル s"Hello, $name" は加工文字列リテラルだ。これはコンパイラーがこのリテラルに追加の仕事をしていることを意味する。加工文字列リテラルは " に先行するいくつかの文字で示される。文字列補間は SIP-11 で導入され、そこには実装の全詳細が含まれる。 + 上記例では、リテラル s"Hello, $name" は加工文字列リテラルだ。これはコンパイラーがこのリテラルに追加の仕事をしていることを意味する。加工文字列リテラルは " に先行するいくつかの文字で示される。文字列補間は SIP-11 で導入され、そこには実装の全詳細が含まれる。 - title: 暗黙クラス by: Josh Suereth description: "Scala 2.10 は暗黙クラス(implicit class)と呼ばれる新しい機能を導入した。暗黙クラスは implicit キーワードでマークされたクラスだ。このキーワードはそのクラスがスコープ内にあるとき、そのプライマリコンストラクターが暗黙変換に利用可能にする。" From 265b7a70408ede0c7afe23fedeb693356db0df06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Bra=C4=8Devac?= Date: Wed, 3 Dec 2025 18:18:43 +0100 Subject: [PATCH 2/2] Update plugin for SIP redirects This goes hand in hand with https://github.com/scala/improvement-proposals/pull/128 --- _plugins/sip_number_permalink.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/_plugins/sip_number_permalink.rb b/_plugins/sip_number_permalink.rb index 2560711d77..1ec4ba9be3 100644 --- a/_plugins/sip_number_permalink.rb +++ b/_plugins/sip_number_permalink.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# This plugin allows using front matter variables in permalinks. +# This plugin allows using front matter variables in permalinks and redirect_from. # For example: permalink: /sips/:number will use the 'number' front matter field. Jekyll::Hooks.register :site, :after_init do @@ -10,3 +10,18 @@ def number end end end + +# Expand :number and :title in redirect_from values +Jekyll::Hooks.register :documents, :pre_render do |doc| + next unless doc.data["redirect_from"] + + redirects = doc.data["redirect_from"] + redirects = [redirects] unless redirects.is_a?(Array) + + doc.data["redirect_from"] = redirects.map do |redirect| + result = redirect + result = result.gsub(":number", doc.data["number"].to_s) if doc.data["number"] + result = result.gsub(":title", Jekyll::Utils.slugify(doc.data["title"])) if doc.data["title"] + result + end +end