rubima / magazine.rubyist.net

るびまの編集リソースを集めたり進行状況を確認するリポジトリです
https://magazine.rubyist.net/
Other
3 stars 9 forks source link

Use tag instead of path for post_url #478

Closed hogelog closed 7 months ago

hogelog commented 7 months ago

現masterのコードだとビルド時にDeprecationがでているので、その修正です。 あまりjekyllに詳しくないですがおそらくこのような修正でよさそう。

Before

$ bundle exec jekyll build
Configuration file: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net/_config.yml
            Source: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net
       Destination: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Deprecation: A call to '{% post_url articles/0006/_posts/2005-05-09-0006-PackageManagement %}' did not match a post using the new matching method of checking name (path-date-slug) equality. Please make sure that you change this tag to match the post's name exactly.
                    done in 9.573 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

After

$ bundle exec jekyll build
Configuration file: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net/_config.yml
            Source: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net
       Destination: /Users/hogelog/repos/oss/ruby/magazine.rubyist.net/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 6.82 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

image

ローカルでの動作確認の様子。適切にリンクされてそうです。