Created
July 25, 2019 07:57
-
-
Save dnlvgl/9dc9d211a7fcce4970586f35970440aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<ol> | |
<li v-for="doc in docs"> | |
<router-link :to="doc.path">{{ doc.title }}</router-link> | |
</li> | |
</ol> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "DocList", | |
computed: { | |
docs() { | |
const pages = this.$site.pages | |
.filter(x => x.regularPath.startsWith("/docs/code/")) | |
.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0)); | |
return pages; | |
} | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment