File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ active_dojos : 180
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ <h3 class="headline rich_font">DecaDojo とは?</h3>
199
199
200
200
< h3 class ="headline rich_font " style ='margin-top: 70px; '> CoderDojo とは?</ h3 >
201
201
< div class ="desc ">
202
- < p > CoderDojo は7〜17歳を対象とした非営利のプログラミング道場です。2011年にアイルランドで始まり、世界では100カ国・2,000の道場、< a href ='https://coderdojo.jp/ '> 日本には180以上の道場 </ a > があります。</ p >
202
+ < p > CoderDojo は7〜17歳を対象とした非営利のプログラミング道場です。2011年にアイルランドで始まり、世界では100カ国・2,000の道場、< a href ='https://coderdojo.jp/ '> 日本には{{ site.data.stats['active_dojos'] }}以上の道場 </ a > があります。</ p >
203
203
</ div >
204
204
</ div >
205
205
</ div >
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'net/http'
4
+ require 'json'
5
+ require 'yaml'
6
+
7
+ BASE_URL = 'https://coderdojo.jp'
8
+ DOJO_STATS = JSON . parse Net ::HTTP . get ( URI . parse "#{ BASE_URL } /stats.json" ) , symbolize_names : true
9
+ STATS_PATH = '_data/stats.yml'
10
+
11
+ stats = YAML . load_file ( STATS_PATH )
12
+ stats [ 'active_dojos' ] = DOJO_STATS [ :active_dojos ]
13
+ YAML . dump stats , File . open ( STATS_PATH , 'w' )
You can’t perform that action at this time.
0 commit comments