Closed #33
This commit is contained in:
parent
22615fa010
commit
a80c6950bc
4 changed files with 35 additions and 1 deletions
24
.vuepress/components/Sitemap.vue
Normal file
24
.vuepress/components/Sitemap.vue
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<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>
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
<Content custom></Content>
|
<Content custom></Content>
|
||||||
|
|
||||||
<edit-link :path="this.$page.path"></edit-link>
|
<edit-link :path="this.$page.path"></edit-link>
|
||||||
|
|
||||||
|
<router-link to="/sitemap.html">Sitemap</router-link>
|
||||||
|
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
|
||||||
|
@ -64,6 +66,8 @@
|
||||||
<Content custom></Content>
|
<Content custom></Content>
|
||||||
|
|
||||||
<edit-link :path="this.$page.path"></edit-link>
|
<edit-link :path="this.$page.path"></edit-link>
|
||||||
|
|
||||||
|
<router-link to="/sitemap.html">Sitemap</router-link>
|
||||||
|
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
|
||||||
|
|
7
sitemap.md
Normal file
7
sitemap.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: Sitemap
|
||||||
|
---
|
||||||
|
|
||||||
|
# Sitemap
|
||||||
|
|
||||||
|
<Sitemap></Sitemap>
|
Loading…
Reference in a new issue