Browse Source

Add page title

master
Riyyi 4 days ago
parent
commit
57ea6a88d1
  1. 8
      src/app.vue
  2. 4
      src/pages/articles/index.vue

8
src/app.vue

@ -4,3 +4,11 @@
</NuxtLayout> </NuxtLayout>
<Toast /> <Toast />
</template> </template>
<script setup lang="ts">
useHead({
titleTemplate: (titleChunk) => {
return titleChunk ? `${titleChunk} - website-vue` : 'website-vue';
}
})
</script>

4
src/pages/articles/index.vue

@ -2,12 +2,12 @@
<div> <div>
<h1>Articles</h1> <h1>Articles</h1>
<ul> <ul>
<li v-for="article in articles" :key="article._path"> <li v-for="article in articles" :key="article.path">
<NuxtLink :to="article.path">{{ article.title }}</NuxtLink> <NuxtLink :to="article.path">{{ article.title }}</NuxtLink>
</li> </li>
</ul> </ul>
<div v-for="article in articles" :key="article._path"> <div v-for="article in articles" :key="article.path">
<pre>{{ article }}</pre> <pre>{{ article }}</pre>
</div> </div>
</div> </div>

Loading…
Cancel
Save