feat: do not use path as date

This commit is contained in:
2026-04-26 15:10:30 +02:00
parent af9b20485e
commit 34c410b687
7 changed files with 29 additions and 34 deletions
+2 -8
View File
@@ -4,7 +4,7 @@ import { ref, onBeforeMount } from 'vue'
import { loadArticle } from '@lib/articles'
import { useRoute, onBeforeRouteUpdate, type RouteLocation } from 'vue-router'
import NotFoundView from './NotFoundView.vue'
import { dateFromParts, simpleDateFormat } from '@lib/dates'
import { simpleDateFormat } from '@lib/dates'
import { SIGNATURE, TITLE } from '@lib/meta'
import PageFooter from '@components/PageFooter.vue'
import { stripHTML } from '@/lib/strings'
@@ -15,13 +15,7 @@ const route = useRoute()
async function loadPage(target: RouteLocation) {
loading.value = true
article.value = await loadArticle(
dateFromParts(
target.params.year as string,
target.params.month as string,
target.params.day as string,
),
)
article.value = await loadArticle(target.params.pathMatch as string)
window.document.title =
stripHTML(TITLE) + ' — ' + stripHTML(article.value?.metadata.title ?? 'Not Found')
loading.value = false