lbry.tech/.vuepress/components/Sitemap.vue
Kristian Polso a80c6950bc Closed #33
2018-05-04 14:10:57 +03:00

24 lines
459 B
Vue

<template>
<ul id="sitemap">
<li v-for="route in routes">
<router-link v-bind:to="route.path">{{ route.path }}</router-link>
</li>
</ul>
</template>
<script>
export default {
data: function() {
var routes = [];
this.$router.options.routes.forEach(function(item) {
if(item.path != "/" && item.path != "*") {
routes.push(item);
}
});
return {
routes: routes
}
},
name: 'Sitemap'
}
</script>