Timothy Gerla e70b7e3073 docs: fix broken links in components pages (fixes #2117)
- Intra-site docs links need to be relative
- Add nuxt-interpolation to rewrite <a> tags to <nuxt-link> tags
which improves the single-page-app behavior when clicking on internal links.

Signed-off-by: Timothy Gerla <tim@gerla.net>
2020-05-18 08:06:23 -07:00

23 lines
516 B
Vue

<template>
<article class="c-rich-text">
<div class="flex">
<h2 class="flex-grow">{{ doc.title }}</h2>
<GitHubLink
class="flex-grow-0 object-middle p-2 pt-4 md:pr-4"
></GitHubLink>
</div>
<div v-interpolation v-html="doc.content" class="border-t pt-4"></div>
</article>
</template>
<script>
import GitHubLink from '~/components/GitHubLink.vue'
export default {
name: 'Content',
components: { GitHubLink },
props: { doc: { type: Object, default() {} } }
}
</script>