I am trying to create a simple project display page,
where you have a Project List page which displays all posts from a Projects_List Directory,
heres and example of what i'm trying to recreate.
this is my folder structure:
project
|-- .vuepress
|-- projectslist
| |-- post1
| `-- post2
|-- About.md
|-- ProjectsList.md
`-- theme
`-- layouts
|-- ProjectsList.vue
`-- About.vue
We are working in the ProjectsList.vue
I was looking through the site with VueDev tools and found that
vuepress sends along this data: $site.pages, which is an object an array of 4, which includes all of my .md files.
Now when i run this code:
<ol>
<li v-for="page in $site.pages">
{{ page.relativePath }}
</li>
</ol>
page.relativePath is <pagename>.md
I get this output on my page:
1. About.md
2. ProjectsList.md
3. projectslist/post1.md
4. projectslist/post2.md
So basically the $site.pages reads all pages from root level,
theres also $localePath and $site.base which are both equal to /.
So what I am thinking is, if i can change $site.base to /projectslist it should only read the .md files from that folder.
heres where my vue knowledge falls short, I cant seem to change those parameters, I tried catching them in the computed & data but then i get an error that they are not defined.