ruby

each_with_indexで番号を取る

- current_page.data.test_list.each_with_index do |test, index| .number= index + 1 .test-box= test 説明 front matterでtest_listに数値をセットして、 .test-box に入れる _with_index をつけると0,1,2,3,4,5,,,という数字をとれる indexは0から始まる…