Skip to content

Instantly share code, notes, and snippets.

@mattmaribojoc
Created September 19, 2021 14:25
Show Gist options
  • Select an option

  • Save mattmaribojoc/c63c601550e950cb8ab422a1ca793275 to your computer and use it in GitHub Desktop.

Select an option

Save mattmaribojoc/c63c601550e950cb8ab422a1ca793275 to your computer and use it in GitHub Desktop.
<template>
<Layout>
<header>
<h1> {{ $page.post.title }} </h1>
<h3 class="subheader">
{{ moment($page.post.date).format('MMMM d, YYYY') }}
&middot;
{{ $page.post.timeToRead }} min. read
</h3>
</header>
<div v-html="$page.post.content" class="post__content"/>
<div class="tags">
<span v-for="tag in $page.post.tags" :key="tag">
{{ tag }}
</span>
</div>
</Layout>
</template>
<page-query>
query Post ($path: String!) {
post (path: $path) {
title,
path,
date,
summary,
tags,
content,
timeToRead
}
}
</page-query>
<script>
</script>
<style>
header .subheader {
font-size: 1em;
color: #AAAAAA;
}
.post__content {
line-height: 200%;
}
.tags > span {
background-color: #ddd;
border-radius: 5px;
padding: 5px;
margin-right: 5px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment