это мой файл readme.md
---
#blog_index: true
sidebar: auto
---
<IndexByCategory />
это мой компонент IndexByCategory
<template>
<div>
<div v-for="(posts,postTag,index) in postsResult">
<h2 :id="postTag"><a href="#" aria-hidden="true" class="header-anchor">#</a> {{postTag}}</h2>
<div v-for="post in posts">
<h3>
<router-link :to="post.path">{{ post.frontmatter.title }}</router-link>
</h3>
<p>{{ post.frontmatter.description }}</p>
<p>
<router-link :to="post.path">Read more</router-link>
</p>
<hr>
</div>
</div>
</div>
</template>
<script>
export default {
computed: {
postsResult() {
var tagSort = new Object();
var filteredPages=this.$site.pages.filter(x => x.path.startsWith('/blog/'));
//console.log(this.$site["pages"]);
filteredPages.forEach(element => {
if(element["frontmatter"]["tags"]==undefined){
console.log(element["title"]+" don't have tags in frontmatter!");
}
element["frontmatter"]["tags"].forEach(element2 => {
if (tagSort[element2] == undefined) {
tagSort[element2] = new Array();
}
tagSort[element2].push(element);
});
});
//console.log(tagSort);
return tagSort;
}
}
}
</script>
В файлах уценки (*. Md) vuepress может автоматически генерировать боковую панель в соответствии сТеги заголовка (# ## ###). Я хочу создать боковую панель в компоненте vuepress, как в файлах уценки, но я не знаю, какой самый быстрый способ реализовать это.