feat(pub): add /pub index listing all notes

This commit is contained in:
Julien Calixte
2026-05-23 16:52:08 +02:00
parent d0175025ad
commit 9e1fae4f2e

28
src/pages/pub/index.vue Normal file
View File

@@ -0,0 +1,28 @@
<script setup lang="ts">
import { fetchNotes } from "@/api/fetch-notes"
const notes = await fetchNotes()
useHead({
title: "Articles",
})
</script>
<template>
<section class="pub-list">
<h1>Articles</h1>
<ul>
<li v-for="note in notes" :key="note.path">
<a :href="note.path">{{ note.title }}</a>
</li>
</ul>
</section>
</template>
<style scoped lang="scss">
.pub-list {
max-width: 800px;
margin: auto;
padding: 1rem;
}
</style>