Noriyo Akita's Today I Learned

# 2024-09-19

Table of Contents

2024-09-19

https://github.com/adamdjbrett/doctrineofdiscovery.org

https://doctrineofdiscovery.org

どうしても自分の手元だと jekyll-paginate がうまく動かない
調べた結果、これはなんかうまくいってそう。ソースコードをダウンロードしてしばらく遊んでみよう

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($span-width, $container) or calc($span-width / $container)
More info and automated migrator: https://sass-lang.com/d/slash-div
93 │ @return percentage($span-width / $container);
│ ^^^^^^^^^^^^^^^^^^^^^^^^
../../../../minimal-mistakes-jekyll-4.26.2/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss 93:24 su-span()
../../../../minimal-mistakes-jekyll-4.26.2/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss 190:11 su-call()
../../../../minimal-mistakes-jekyll-4.26.2/_sass/minimal-mistakes/vendor/susy/susy/_api.scss 146:13 susy-span()
../../../../minimal-mistakes-jekyll-4.26.2/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss 19:11 span()
/Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/_sass/minimal-mistakes/_utilities.scss 185:24 @content
minimal-mistakes/vendor/breakpoint/_breakpoint.scss 66:7 breakpoint()
/Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/_sass/minimal-mistakes/_utilities.scss 184:3 @import
minimal-mistakes.scss 34:9 @import
/Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/assets/css/main.scss 4:9 root stylesheet
Warning: 2 repetitive deprecation warnings omitted.
Run in verbose mode to see all warnings.
Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/_site/blog/canopy-series-introduction/index.html
- /Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/_posts/2023-03-10-canopy-series-introduction.md
- /Users/noriyo_tcp/MyPlayground/doctrineofdiscovery.org-master/_posts/2023-03-11-canopy-series-introduction.md

Dart Sass 関係の警告と なんか destination blog/canopy-series-introduction/index.html が複数のファイルで共有されている、という警告がでた。ふーん これは _site に生成されているが、元のファイルはなさそうだなあ?

その複数のファイル2つを消してみたら警告は出なくなった

index の Recent post の一覧を見てみる

さまざまなディレクトリに入っている記事が並んでいる。magazine, blog など

Lies of Discovery — Oregon Humanities

この記事の実態はここ

https://github.com/adamdjbrett/doctrineofdiscovery.org/blob/master/_posts/2024-06-26-lies-of-discovery.md

つまり magazine というディレクトリに入っているわけではない。front matter の link によって設定されている

_posts

もう少し _posts 内の記事を見てみる すべて日付 YYYY-mm-dd から始まっている。これは Jekyll がそうなっている

https://github.com/adamdjbrett/doctrineofdiscovery.org/blob/master/_posts/2024-09-10-s05e02.md

この記事は link が subdomain つきで podcast へのページになっている。なるほど!
link: 'https://podcast.doctrineofdiscovery.org/season5/episode-02/' となっている

layout が違うので podcast 用のレイアウトとかあるのかな
わからんが author 用のレイアウトファイルはあったのだが… authors ページへの導線がわからん
まあでも基本トップページ(ページネーション)と各記事さえあればいい

Atom feed

これは残しておいていいかもなあ。それよりソーシャルメディアがいらんかな

jekyll clean しないと変更が反映されないなあ?

これどうなってるんだろう?何にしろひたすら削除だなあ

theme

theme: minimal-mistakes-jekyll

page__hero-overlay class がついている div はどうやらテーマのものらしい

-> 良さげではあるんだけど今は採用しない。結構それによるパーツがたくさんあり、テーマごと削除しなきゃいけない感じだ

_data/snippets.yml

いろんな Jekyll の変数を入れているようだ

https://jekyllrb.com/docs/structure/

index.html

一見 front matter が大部分を占める
feature_row は記事の上部にある3カラムの記事のカードみたいなやつ

多分これもテーマ由来なのだろう

/papal-bulls/sublimis-deus/

これはどこでルーティングが設定されているのだ? /papal-bulls はページを削除したのだが

なんとかなった

  • html が include されている部分をひたすら削ってエラーが出ないようにする
  • minimal-mistakes-jekyll を削除
  • hacker theme を入れる
  • github-pages gem も入れる
    • これ自体が jekyll-paginate やその他のプラグイン gem を内包している
    • なので元々記述されていた gem はほとんど削除できた
  • けどなんか真っ白だな?
    • https://github.com/pages-themes/hacker/blob/master/_layouts/default.html
    • hacker の default layout をコピペする

pagination

元々のテーマの頃から動いていた
github-pages gem も jekyll-paginate を内包しているし、公式サイトからテンプレもコピペした https://jekyllrb.com/docs/pagination/

あとは _config.yml での設定など。til のほうがなぜ動かないのか?は謎

My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts

# 2024-09-20

2 min read

試しにいじって遊んでいるプロジェクトはだいぶわかってきたtil の記事を移植してみる。もしかしたらカスタムコンバータも動くかもしれないそれがダメでも JavaScript での実装がある

Read