このブログは jekyll によって構築されているが、月別のポスト数を算出したい。

記事は _posts/yyyy-mm-dd-xxxxxxxxx.md の形式になっているので、下記のようにシェル芸で算出できる。

$ ls _posts/2024-* | awk -F '-' '{print $1 "-" $2}' | sort | uniq -c
  11 _posts/2024-01
   7 _posts/2024-02
  12 _posts/2024-03
  16 _posts/2024-04
   7 _posts/2024-05
  17 _posts/2024-06
  15 _posts/2024-07
  15 _posts/2024-08
   7 _posts/2024-09
   9 _posts/2024-10
  14 _posts/2024-11
  19 _posts/2024-12