feat: do not use path as date
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user