<commit_before><template>
  <div>
    <article class="entry">
      <header>
        <h1 class="entry-title">Archive</h1>
      </header>
      <section v-for="(entries, year) in list" :key="year" class="entry-content">
        <h2 class="archive-year">{{ year }}</h2>
        <ul>
          <li v-for="entry in entries" :key="entry.id">
            <time :datetime="entry.date | dateToISOString">{{ entry.date | formatDate }}</time>
            <router-link :to="entry.link">{{ entry.title }}</router-link>
          </li>
        </ul>
      </section>
    </article>
  </div>
</template>

<script>
/**
 * Create a page named "archive".
 *  permalink: 'https://example.com/archive/'
 */
import api from '@scripts/api';

export default {
  name: 'Archive',
  filters: {
    formatDate: function(date) {
      if (typeof date === 'string') {
        date = new Date(date);
      }

      return date
        .toISOString()
        .split('T')[0]
        .replace(/-/g, '/');
    },
  },
  data() {
    return {
      list: null,
    };
  },
  mounted() {
    this.$store.dispatch('loading', true);

    api.getArchive().then(response => {
      this.list = response.data;
      this.$store.dispatch('loading', false);
    });
  },
};
</script>

<style lang="scss" scoped>
ul {
  padding: 0;
}

li {
  display: flex;
  padding: 0 1rem;
  line-height: 2.5rem;
  list-style-type: none;
}

time {
  flex: 0 0 6rem;
  margin-right: 2rem;
  color: $grey-400;
}
</style>
<commit_msg>fix: titleをセットするよう修正<commit_after><template>
  <div>
    <article class="entry">
      <header>
        <h1 class="entry-title">{{ pageTitle }}</h1>
      </header>
      <section v-for="(entries, year) in list" :key="year" class="entry-content">
        <h2 class="archive-year">{{ year }}</h2>
        <ul>
          <li v-for="entry in entries" :key="entry.id">
            <time :datetime="entry.date | dateToISOString">{{ entry.date | formatDate }}</time>
            <router-link :to="entry.link">{{ entry.title }}</router-link>
          </li>
        </ul>
      </section>
    </article>
  </div>
</template>

<script>
/**
 * Create a page named "archive".
 *  permalink: 'https://example.com/archive/'
 */
import api from '@scripts/api';

export default {
  name: 'Archive',
  filters: {
    formatDate: function(date) {
      if (typeof date === 'string') {
        date = new Date(date);
      }

      return date
        .toISOString()
        .split('T')[0]
        .replace(/-/g, '/');
    },
  },
  data() {
    return {
      list: null,
    };
  },
  computed: {
    pageTitle: () => 'Archive',
  },
  mounted() {
    this.$store.dispatch('loading', true);

    api.getArchive().then(response => {
      this.list = response.data;
      this.$store.commit('setPageTitle', this.pageTitle);
      this.$store.dispatch('loading', false);
    });
  },
};
</script>

<style lang="scss" scoped>
ul {
  padding: 0;
}

li {
  display: flex;
  padding: 0 1rem;
  line-height: 2.5rem;
  list-style-type: none;
}

time {
  flex: 0 0 6rem;
  margin-right: 2rem;
  color: $grey-400;
}
</style>

{'fraction_non_alphanumeric': 0.1947334200260078, 'fraction_numerical': 0.011053315994798439, 'mean_word_length': 2.3228941684665227, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 58, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6403411', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1075, 'n_words': 230}