Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symlink for missing matz image for legworks #318

Merged
merged 1 commit into from Oct 15, 2020

Conversation

pocke
Copy link
Contributor

@pocke pocke commented Oct 12, 2020

「Rubyist のための他言語探訪」でmatzの画像がリンク切れになっているのを修正します。

Problem

「Rubyist のための他言語探訪」の一部のページでmatzの画像がリンク切れになっていました。 例: https://magazine.rubyist.net/articles/0022/0022-Legwork.html のページ下部など
それぞれリンク切れかどうかと、リンク先のsrcは次のようになっています。

リンク切れかどうか src
第 1 回 Python ok ../../images/0008-Legwork/elephant_at_hokudai.jpg
第 2 回 CLU リンク切れ ../../images/0009-Legwork/elephant_at_hokudai.jpg
第 3 回 Io リンク切れ ../../images/0010-Legwork/elephant_at_hokudai.jpg
第 4 回 Tcl ok ../../images/0011-Legwork/matz_in_suit.jpg
第 5 回 Groovy アイコンなし ---
第 6 回 Dylan リンク切れ ../../images/0013-Legwork/matz_in_suit.jpg
第 7 回 Icon リンク切れ ../../images/0014-Legwork/matz_in_suit.jpg
第 8 回 Forth リンク切れ ../../images/0015-Legwork/matz_in_suit.jpg
第 9 回 日本語プログラミング言語「なでしこ」 ok matz以外の著者の画像
第 10 回 Erlang リンク切れ ../../images/0017-Legwork/matz_in_suit.jpg
第 11 回 C++ ok ../../images/0018-Legwork/matz.jpg
第 12 回 APL と J リンク切れ ../../images/0019-Legwork/matz.jpg
第 13 回 Prolog リンク切れ ../../images/0021-Legwork/matz.jpg
第 14 回 Whitespace リンク切れ ../../images/0022-Legwork/matz.jpg

そして、どうやらこの結果を見ると、「同じ画像が続く時、その画像の初回登場以外」でリンク切れになっているようです。
たとえば第1回 Pythonの画像はelephant_at_hokudai.jpgですが、これと同じ画像が出てくる第2回 CLU ではリンク切れになっています。
そして、画像がmatz_in_suit.jpgに変わった第4回 Tclでは画像が復活していますが、その次に同じ画像が使われている第6回ではまたリンク切れになっています。

なお、軽くgitのログを見てみたところ、このリポジトリの最初のコミットの時点から、これらの画像は存在していなかったようでした。

Solution

存在しない画像を指しているものにたいして、同名の画像に向けたシンボリックリンクを作成します。
これによって画像が存在するようになるので、画像のリンク切れが改善します。
実際にbundle exec jekyll serve -I --futureでサーバーを立ち上げて、各画像が表示されることを確認済みです。

github pages でsymlink がうまく動くのか不安でしたが、ググって出てきたテストリポジトリを見る限りうまく動きそうに見えるので、大丈夫かなと思っています。
https://github.com/s4y/gh-pages-symlink-test

@miyohide miyohide merged commit 03a3d48 into rubima:master Oct 15, 2020
@miyohide miyohide mentioned this pull request Oct 15, 2020
@pocke pocke deleted the add-missing-matz-images branch October 15, 2020 12:28
miyohide added a commit to rubima/rubima.github.io that referenced this pull request Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants