Created
March 16, 2021 23:41
-
-
Save jasonbahl/025ebf14edb85d712914e97cdf9b4d9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // src/pages/Blog.vue | |
| <template> | |
| <Layout> | |
| <section> | |
| <article v-for="(post, index) in $static.posts.edges" :key="index"> | |
| <h1>{{ post.node.title }}</h1> | |
| <p> | |
| By <span>{{ post.node.author.node.name }}</span> on | |
| {{ getDate(post.node.date) }} | |
| </p> | |
| <div | |
| v-html=" | |
| post.node.content.length > 100 | |
| ? post.node.content.substring(0, 100) + '[...]' | |
| : post.node.content | |
| " | |
| ></div> | |
| <g-link :to="`${post.node.uri}`">Read more</g-link> | |
| </article> | |
| </section> | |
| </Layout> | |
| </template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment