Fix titles

This commit is contained in:
2021-04-18 19:30:51 +02:00
parent 2e814784e7
commit 4cc9c416f7
3 changed files with 13 additions and 14 deletions

View File

@@ -21,17 +21,14 @@
</main>
</template>
<script lang="ts">
import {useContext, useMeta} from "@nuxtjs/composition-api";
<script>
export default {
name: "about",
head() {},
setup() {
const { i18n } = useContext()
const { title } = useMeta()
title.value = `${i18n.t('header.about')} - Arthur Danjou`
head() {
return {
title: `${this.$i18n.t('header.about')} - Arthur Danjou`
}
}
}
</script>

View File

@@ -28,22 +28,23 @@
</template>
<script lang="ts">
import {useAsync, useContext, useMeta} from "@nuxtjs/composition-api";
import {useAsync, useContext} from "@nuxtjs/composition-api";
import {Project} from "../../@types/types";
export default {
name: "index",
head: {},
head() {
return {
title: `${this.$i18n.t('header.projects')} - Arthur Danjou`
}
},
setup() {
const { $content, i18n } = useContext()
const { $content } = useContext()
const projects = useAsync(() => {
return $content('projects').fetch<Project>()
})
const { title } = useMeta()
title.value = `${i18n.t('header.projects')} - Arthur Danjou`
return {
projects
}

View File

@@ -76,6 +76,7 @@
</template>
<script>
export default {
name: "uses",
head() {