<template>
  <ul>
    <li v-for="page of $site.pages
      .filter(page => page.regularPath.match(new RegExp(`^${ path }.`)))
      .slice(0, limit)
    ">
      <router-link :to="page.regularPath">{{ page.title }}</router-link>
    </li>
  </ul>
</template>

<script>
export default {
  name: "FolderList",
  props: {
    path: String,
    limit: {
      type: Number,
      default: 8,
    },
  },
};
</script>
