feat: add title to note pages

This commit is contained in:
Julien Calixte
2026-03-14 13:09:59 +01:00
parent 975f6dc46b
commit 577e10a9d3
4 changed files with 21 additions and 12 deletions

View File

@@ -28,7 +28,9 @@
"@atproto/api": "^0.19.0",
"chart.xkcd": "^1.1.15",
"marked": "^17.0.3",
"md4x": "^0.0.25",
"nanoid": "^5.1.6",
"pinia": "^3.0.4"
}
}
},
"packageManager": "pnpm@10.32.1"
}

17
pnpm-lock.yaml generated
View File

@@ -17,6 +17,9 @@ importers:
marked:
specifier: ^17.0.3
version: 17.0.3
md4x:
specifier: ^0.0.25
version: 0.0.25
nanoid:
specifier: ^5.1.6
version: 5.1.6
@@ -1453,10 +1456,6 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
baseline-browser-mapping@2.8.31:
resolution: {integrity: sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==}
hasBin: true
binary-extensions@2.3.0:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'}
@@ -2211,6 +2210,10 @@ packages:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
md4x@0.0.25:
resolution: {integrity: sha512-GrexawUhrKcwl7o2hkgs7Ut0PqI/meOCevmaRB1ueKo2y1Fh2nIl8e6KKawYGm9eXJP3u6BzVs4rzZOc2+w3hA==}
hasBin: true
mdast-util-from-markdown@2.0.2:
resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==}
@@ -4660,8 +4663,6 @@ snapshots:
baseline-browser-mapping@2.10.0: {}
baseline-browser-mapping@2.8.31: {}
binary-extensions@2.3.0: {}
birpc@2.8.0: {}
@@ -4681,7 +4682,7 @@ snapshots:
browserslist@4.28.0:
dependencies:
baseline-browser-mapping: 2.8.31
baseline-browser-mapping: 2.10.0
caniuse-lite: 1.0.30001757
electron-to-chromium: 1.5.260
node-releases: 2.0.27
@@ -5605,6 +5606,8 @@ snapshots:
math-intrinsics@1.1.0: {}
md4x@0.0.25: {}
mdast-util-from-markdown@2.0.2:
dependencies:
'@types/mdast': 4.0.4

View File

@@ -19,10 +19,13 @@ export default definePageComponent({
<script setup lang="ts">
import type { Note } from "~/api/note.type"
import { marked } from "marked"
import { computed } from "vue"
const props = defineProps<{ note: Note }>()
const textContent = computed(() => marked.parse(props.note.textContent))
const textContent = marked.parse(props.note.textContent)
useHead({
title: props.note.title,
})
</script>
<template>

View File

@@ -11,7 +11,8 @@
"resolveJsonModule": true,
"esModuleInterop": true,
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
"~/*": ["./src/*"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
"skipLibCheck": true