Conversation
## 変更内容 - cache_data_as_yaml.rb: JSONデータをYAML形式でキャッシュするスクリプトを追加 - earth.json/japan.json: Jekyllでsite.dataから動的にJSON生成するページを追加 - GitHub Actions: 毎日の自動更新にYAMLキャッシュ処理を統合 ## 改善点 - データ管理の簡素化: earth.ymlのみ管理(japan.ymlは廃止) - 動的フィルタリング: japan.jsonはLiquidフィルターで動的生成 - キー形式の統一: YAML/JSON共に文字列キー使用 ## 技術的詳細 - earth.yml: 全1469道場のデータを保存 - japan.json: countryCode=="JP"で314道場を動的抽出 - データの重複を排除し、単一ソースを維持
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
DojoデータをYAML形式でキャッシュし、Jekyllの
site.data機能を使ってJSON APIを提供する機能を追加しました。変更内容
cache_data_as_yaml.rb: JSONデータをYAML形式でキャッシュするスクリプトを追加earth.json/japan.json: Jekyllでsite.dataから動的にJSON生成するページを追加Rakefile: 新しいタスクcache_data_as_yamlを追加機能詳細
YAMLキャッシュ
_data/earth.yml: Clubs APIの全データ(1469道場)をYAML形式で保存brand:,name:など)動的JSON生成
earth.json: Clubs API のキャッシュ化されたデータjapan.json: 上記からcountryCode == "JP"でフィルタリングした日本の道場データ(Active/Inactive の両方を含む314道場)※ 現時点出力フォーマット
テスト
bundle exec rake cache_data_as_yamlでYAMLファイル生成を確認japan.jsonが正しく314道場を含むことを確認