mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-19 13:41:13 +02:00
This will allow us to iterate faster on documentation for multiple versions of Talos. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
36 lines
786 B
Vue
36 lines
786 B
Vue
<template>
|
|
<div class="content w-full mb-4">
|
|
<article class="article-content c-rich-text">
|
|
<h1 class="page-heading">{{ attributes.title }}</h1>
|
|
<section class="border-t pt-4" v-html="content"></section>
|
|
</article>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import axios from 'axios'
|
|
|
|
export default {
|
|
async asyncData({ params, error, payload }) {
|
|
if (payload) {
|
|
return {
|
|
attributes: payload.attributes,
|
|
content: payload.content
|
|
}
|
|
}
|
|
|
|
const base = process.client
|
|
? window.location.origin
|
|
: 'http://localhost:3000'
|
|
|
|
const [indexRes] = await Promise.all([axios.get(base + '/index.json')])
|
|
const index = indexRes.data
|
|
|
|
return {
|
|
attributes: index.attributes,
|
|
content: index.content
|
|
}
|
|
}
|
|
}
|
|
</script>
|