Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (27 sloc) 593 Bytes
<template>
<PagePreviews :pages="taggedPages()"></PagePreviews>
</template>
<script>
import PagePreviews from '~/components/PagePreviews';
export default {
components: {
PagePreviews
},
data() {
return {
pages: require('~/static/api/blog-latest.json')
}
},
methods: {
taggedPages() {
let tag = this.$route.params.tag.replace("-", " ");
if (!tag) {
return this.pages;
}
return this.pages.filter(page => {
return page.tags.includes(tag);
});
}
}
};
</script>
You can’t perform that action at this time.